我目前正在使用此代码:
List<int> list = new List<int>();
list.Add(0);
list.Add(1);
list.Add(2);
list.Add(3);
color0 = list[1];
color1 = list[2];
color2 = list[3];
color3 = list[4];
Run Code Online (Sandbox Code Playgroud)
有没有一种可能的方法,此列表可以在1个元素中包含2个参数?我的意思是:
List<int,int> list = new List<int,int>();
list.Add(0,3);
list.Add(1,8);
color0=list[1][2]; //output 3
color1=list[1][1]; //output 0
color2=list[2][2]; //output 8
color3=list[2][1]; //output 1
Run Code Online (Sandbox Code Playgroud)
我有可能实现类似的目标吗?
我对vb.net编码很新.我搜查了一下,但没有找到能解决问题的东西.
If Number.Text = "974.823" Or Number.Text = "231.65" Or Number.text = "567.32" Or Number.text = "476.45" Or Number.text = "149.39" Or Number.text = "675.19" Then
win.text = "Success"
Else
Stop
End If
Run Code Online (Sandbox Code Playgroud)
我试过了OrElse,但它也没用.
If Number.Text = "974.823" OrElse Number.Text = "231.65" OrElse Number.text = "567.32" OrElse Number.text = "476.45" OrElse Number.text = "149.39" OrElse Number.text = "675.19" Then
win.text = "Success"
Else
Stop
End If
Run Code Online (Sandbox Code Playgroud)