public struct shuzu
{
public float a;
public float b;
public float c;
public float d; public shuzu(float a, float b, float c, float d)
{
this.a = a;
this.b = b;
this.c = c;
this.d = d;
}
} shuzu[] aa = new shuzu[6];aa 在下面是不能用的。为什么???
{
public float a;
public float b;
public float c;
public float d; public shuzu(float a, float b, float c, float d)
{
this.a = a;
this.b = b;
this.c = c;
this.d = d;
}
} shuzu[] aa = new shuzu[6];aa 在下面是不能用的。为什么???
解决方案 »
- 当前实例如何获取父实例的属性
- 如何遍历winform中所有的radiobutton控件
- C#读取文件指定列的数据,或者如何取得ArrayList中指定列的数据?
- 域中用户无法通过.ENT的WEBForm来访问数据库
- 谁知道sftp建立连接怎么建啊?最好给个例子.
- InstallShield 10.5打包的软件,安装后,重新开机后经常又跳出软件继续安装的界面
- 如何使函数参数不可修改?
- 结构体存放非轻量级数据有什么问题??
- 关于正则表达式
- 求dotNet自画窗体标题栏的源码
- 老问题!在一个窗体中刷新另一个窗体的方法!
- timer1_Tick(..)如何调用Mybutton_Paint(..)事件呢?
{
public float a;
public float b;
public float c;
public float d; public shuzu(float a, float b, float c, float d)
{
this.a = a;
this.b = b;
this.c = c;
this.d = d;
楼主没搞清楚变量的作用域
如果要给结构赋值应该这样写
shuzu newshuzu;
newshuzu.a=a;
newshuzu.b=b;
newshuzu.c=c;
}
} shuzu[] aa = new shuzu[6]; aa 在下面是不能用的。为什么???