①
string[] OK = { "Are you OK", "Hello", "Thank you","Thank you very much" };
这种初始化方式可以写在方法里,也可以写在方法外
②
string[] OK;
OK = new string[4]{"Are you OK", "Hello", "Thank you","Thank you very much" };
这种初始化方式只能在方法里赋值,在方法外赋值系统会报错
③
string[] OK = new string[4];
OK[0] = "Are you OK";
OK[1] = "Hello";
OK[2] = "Thank you";
OK[3] = "Thank you very much";
这种初始化方式只能在方法里赋值,在方法外赋值系统会报错