
c# 结构体 包含数组定义 65
structsss{doublepjf【10】;intmc【10】;stringbh;stringxm;}这样提示错误那要怎么样定义谢谢structxs{double[]...
struct sss
{
double pjf【10】;
int mc【10】;
string bh;
string xm;
}
这样提示错误 那要怎么样定义 谢谢
struct xs
{
double[] pjf = new double[100];
int[] mc = new int[100];
string[] bh = new string[100];
string[] xm = new string[100];
}; 这样还是错 提示为错误 1 “WindowsApplication20.Form1.xs.pjf”: 结构中不能有实例字段初始值设定项 d:\My Documents\Visual Studio 2005\Projects\WindowsApplication20\WindowsApplication20\Form1.cs 17 22 WindowsApplication20
(希望能写具体 把整个代码写出来 谢谢) 展开
{
double pjf【10】;
int mc【10】;
string bh;
string xm;
}
这样提示错误 那要怎么样定义 谢谢
struct xs
{
double[] pjf = new double[100];
int[] mc = new int[100];
string[] bh = new string[100];
string[] xm = new string[100];
}; 这样还是错 提示为错误 1 “WindowsApplication20.Form1.xs.pjf”: 结构中不能有实例字段初始值设定项 d:\My Documents\Visual Studio 2005\Projects\WindowsApplication20\WindowsApplication20\Form1.cs 17 22 WindowsApplication20
(希望能写具体 把整个代码写出来 谢谢) 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询