重庆市万州区红光小学:以下代码如何转换成c#.net

来源:百度文库 编辑:高考问答 时间:2024/04/27 23:54:15
以下代码如何转换成c#.net
sub Application_OnStart(Sender As Object,e As EventArgs)
dim user(20) as string
application("user")=user
....
end sub

sub reg_Click(Sender As object,e as EventArgs)
....
dim tname as string
....
for i=0 to num-1
tname=Application("user")(i)
....
next
....
end sub

void Application_OnStart(Sender As Object,e As EventArgs)
{
string user = "";
application("user") = user
....
}

void reg_Click(Sender As object,e as EventArgs)
{
string tname;
....
for( i=0;i<num-1;i++)
{
tname=Application("user")(i)
....
....
}
}