求高手帮忙把这个循环从VB转化成C#
VB6.0版本:
For i = 1 To 60
Retstr(i) = ReadfromIni(App.Path & "\PointTable2.ini", "Items", "Itm" & (i))
Set oitem(i) = TheOPCitems.AddItem(Retstr(i), i)
oitem(i).IsActive = True
Next i
VB.NET版本:
For i = 1 To 60
Retstr(i) = ReadfromIni(My.Application.Info.DirectoryPath & "\PointTable2.ini", "Items", "Itm" & (i))
oitem(i) = TheOPCitems.AddItem(Retstr(i), i)
oitem(i).IsActive = True
Next i
C# code:
for (int i = 1; i <= 60; i++)
{
Retstr(i) = ReadfromIni(App.Path & @"\PointTable2.ini", "Items", "Itm" & (i));
oitem(i) = TheOPCitems.AddItem(Retstr(i), i);
oitem(i).IsActive = True;
}
C# code:
for(int i = 1;i <=60;i++)
{
Retstr(i) = ReadfromIni(My.Application.Info.DirectoryPath + "\PointTable2.ini", "Items", "Itm" + i.ToString());
oitem(i) = TheOPCitems.AddItem(Retstr(i), i);
oitem(i).IsActive = True;
}
大概是这样?
记错了
相关问答:
login.aspx.vb:
Public ReadOnly Property nameT() As String
Get
Return TextBox1.Text
&nb ......
大家好,问个vb打印问题
printer.print "dsff"
.....
....
Printer.EndDoc
打印成功后我将执行
sqlstr = "update vc_yh set pr=' 已打印 ', ......
请教一下:我用vb写了一个调用Illustrator的测试程序,代码很简单:Private Sub Command1_Click()
Dim app As New Illustrator.Application
Dim doc As Illustrator.Document
Dim thislayer As Illustrator.Layer ......
要用vb打印一条线,长度是100毫米怎么写?
关注
VB code:
Printer.ScaleMode = vbMillimeters
Printer.Line (10, 10)-(110, 10)
Printer.ScaleMode = vbMillimeters
Print ......
我制作了个用户控件,需要动态加载到窗体上
Set objExt = Controls.Add("工程1.meActiveX", argName)
objExt.Visible = True
程序一次能加载N个, 现在想对 ......