小编Kap*_*ein的帖子

使用多变量选择变量

我有很多Int32我想要选择的变量int我要检查.是否可以使用多变量来生成此行并选择变量?

Int32 redleft0 = 0; 
Int32 redleft1 = 0; 
Int32 redleft2 = 0; 
Int32 redleft3 = 0; 
Int32 redleft4 = 0; 
Int32 redleft5 = 0;
Int32 blueleft0 = 0; 
Int32 blueleft1 = 0; 
Int32 blueleft2 = 0; 
Int32 blueleft3 = 0;     
Int32 blueleft4 = 0; 
Int32 blueleft5 = 0;

redorblue = "red";    
for (int i = 0; i < count; i++)
{ 
    String checkleftint = (redorblue + "left" + i);                   
    if (checkleftint < 0)
    {
    } …
Run Code Online (Sandbox Code Playgroud)

c# variables

1
推荐指数
1
解决办法
98
查看次数

标签 统计

c# ×1

variables ×1