永发信息网

C语言转换成VB

答案:1  悬赏:20  手机版
解决时间 2021-05-22 19:32
  • 提问者网友:杀生予夺
  • 2021-05-21 21:59
static int x; void Button1_Click(Object sender, EventArgs e) { int i,j,row=0; for(i=0;i<=x;i++) { TableRow NewRow=new TableRow(); row++; if(row%2==0) NewRow.BackColor = Drawing.Color.LightGreen; Else NewRow.BackColor = Drawing.Color. LightSkyBlue; for(j=0;j<=x;j++) { TableCell NewCell=new TableCell(); NewCell.Controls.Add(new LiteralControl(i.ToString() + "行" + j.ToString()+ "列")); NewRow.Cells.Add(NewCell); } Table1.Rows.Add(NewRow); } x= i; if( x > 9) x = 0; }
最佳答案
  • 五星知识达人网友:独行浪子会拥风
  • 2021-05-21 23:38
看看满意不
static int x
private sub Button1_Click(Object sender, EventArgs e)

    int i,j,row=0
    for i=0 to x
   
        TableRow NewRow=new TableRow()
        row=row+1
        if(row mod 2==0)
            NewRow.BackColor = Drawing.Color.LightGreen
        else
            NewRow.BackColor = Drawing.Color. LightSkyBlue
        endif
        for j=0 to x
         
            TableCell NewCell=new TableCell()
            NewCell.Controls.Add(new LiteralControl(i.ToString() + "行" + j.ToString()+ "列"))
            NewRow.Cells.Add(NewCell);
        next j
        Table1.Rows.Add(NewRow)
    next i
    x= i
    if x > 9
        x = 0
    endif
end sub
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯