C#中能定义字符串数组常量吗????(急!在线等,搞明白就给分)
刚接触C#没多久,大家别见笑,
我想在C#中定义一个字符串数组常量,但不知道在C#中能不能定义,以及怎么定义
我知道在C#中定义一个字符串常量的方法,既为
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
puulic const string a="aaaaaa";//这里
}
但是要定义一个字符串数组常量就不知道怎么写啊,我曾经试过这样的写法但不行
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
puulic const string[] a = new string[] {"aaaaaa","bbbb","ccccc"};//这里
也试过这样同样不行puulic const string[3] a = {"aaaaaa","bbbb","ccccc"};//
}
不知道那位能给小弟指点一二,谢谢