How to create variables with dynamic names in C#?

前端 未结 6 1430
伪装坚强ぢ
伪装坚强ぢ 2021-01-25 02:29

I want to create a var in a for loop, e.g.

for(int i; i<=10;i++)
{
    string s+i = \"abc\";
}

This should create variables s0, s1, s2... to

6条回答
提交回复
热议问题