1.
YourArrayTable
Array_ID number
Array_Value number1 8
1 22
1 32
1 48
2 1
2 3
2 42. compile config.cs into a dll and copy it to the bin subdirectory of your virtual directory and call it freely
YourArrayTable
Array_ID number
Array_Value number1 8
1 22
1 32
1 48
2 1
2 3
2 42. compile config.cs into a dll and copy it to the bin subdirectory of your virtual directory and call it freely
YourArrayTable
Array_ID number
Array_Value number1 8
1 22
1 32
1 48
2 1
2 3
2 42. compile config.cs into a dll and copy it to the bin subdirectory of your virtual directory and call it freely
实例化该类
YourArrayTable
Array_ID number
Array_Value number1 8
1 22
1 32
1 48
2 1
2 3
2 42. compile config.cs into a dll and copy it to the bin subdirectory of your virtual directory and call it freely
aaa="8,22,32,48,";//其实这里是读出一个字段值
int[] MyArr= new int[aaa] {int.Parse(aaa)}; //我试过的方法,但是有错。:(
for (int i=0; i < MyArr.Length; i++)
{
Response.Write(MyArr[ i ]+"<br>");
}
问题二的:
能不能给个例子看看呀。我很是笨..........:( 学了net很久还是在游呀游的
string[] alist = aaa.Split(',');
int[] MyArr = new int[alist.Length];
for (int i=0; i < MyArr.Length; i++)
{
MyArr[i] = Int32.Parse(alist[i].Trim());
Response.Write(MyArr[i]+"<br>");
}
string aa="8,22,32,48,";//其实这里是读出一个字段值
string[] aaa = aa.Split(',');
for (int i=0; i < aaa.Length; i++)
{
Response.Write(aaa[i]+"<br>");
}问题二:
写了个config.cs,其中有个config的类,这个类有些public的方法,比如这个类所在的名称控件为:WebApplication1。
又新建了一个目录为Forum,在Forum里面有个default.aspx,这个page的缺省名称空间是:WebApplication1.Forum,在default.aspx要引用上述的config的类,应该在文件头部引用config的类的名称空间:
using WebApplication1;然后实例化config类:
config myconfig = new config();要是没有引用config类的名称空间可以这样声明config类:
WebApplication1.config myconfig = new WebApplication1.config();
string aa="8,22,32,48,";//其实这里是读出一个字段值
string[] aaa = aa.Split(',');
for (int i=0; i < aaa.Length; i++)
{
Response.Write(aaa[i]+"<br>");
}问题二:
写了个config.cs,其中有个config的类,这个类有些public的方法,比如这个类所在的名称控件为:WebApplication1。
又新建了一个目录为Forum,在Forum里面有个default.aspx,这个page的缺省名称空间是:WebApplication1.Forum,在default.aspx要引用上述的config的类,应该在文件头部引用config的类的名称空间:
using WebApplication1;然后实例化config类:
config myconfig = new config();要是没有引用config类的名称空间可以这样声明config类:
WebApplication1.config myconfig = new WebApplication1.config();