string[] s = new string[2];
for (int i = 0; i < 2; ++i)
{ switch (i) { case 0: s[0] = "Hello "; break; case 1: s[1] = "World"; break;}
}
string[] s = new string[2] { "Hello ", "World" };
No comments:
Post a Comment