易截截图软件、单文件、免安装、纯绿色、仅160KB

求高手帮忙把这个循环从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;

}



大概是这样?

记错了


相关问答:

asp.net(vb)问题

login.aspx.vb:

    Public ReadOnly Property nameT() As String
        Get
            Return TextBox1.Text
    &nb ......

vb打印问题

大家好,问个vb打印问题


printer.print "dsff"
.....
....


Printer.EndDoc


打印成功后我将执行

sqlstr = "update vc_yh set pr=' 已打印 ', ......

vb如何调用Illustrator(此前Illustrator未启动)?

请教一下:我用vb写了一个调用Illustrator的测试程序,代码很简单:Private Sub Command1_Click()
Dim app As New Illustrator.Application
Dim doc As Illustrator.Document
Dim thislayer As Illustrator.Layer ......

vb打印

要用vb打印一条线,长度是100毫米怎么写?
关注

VB code:
Printer.ScaleMode = vbMillimeters
Printer.Line (10, 10)-(110, 10)

    Printer.ScaleMode = vbMillimeters
    Print ......

VB 请教高手关于用户控件问题

我制作了个用户控件,需要动态加载到窗体上

    Set objExt = Controls.Add("工程1.meActiveX", argName)
    objExt.Visible = True

程序一次能加载N个, 现在想对 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号