C#中结构体数组指针如何赋值
展开全部
1.下面是定义一个结构体
struct HSI
{
public int hue;
public int saturation;
public int intensity;
}
Class Test2
{
HSI[] hsi = new HSI[image.width*image.height];
int hue;
int saturation;
int intensity;
hsi[0].hue = hue;
hsi[0].saturation = saturation;
hsi[0].intensity = intensity;
hsi[1].hue = hue;
//这样使用结构数组
}
struct HSI
{
public int hue;
public int saturation;
public int intensity;
}
Class Test2
{
HSI[] hsi = new HSI[image.width*image.height];
int hue;
int saturation;
int intensity;
hsi[0].hue = hue;
hsi[0].saturation = saturation;
hsi[0].intensity = intensity;
hsi[1].hue = hue;
//这样使用结构数组
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询