string[] stes=new string [];
与
string[] stes=new string []{};有什么区别
与
string[] stes=new string []{};有什么区别
解决方案 »
- Server.ScriptTimeout.ToString()取得的系统开机时长转换成时分秒
- 用DataList显示从数据库读出来的数据,能不能显示序号???
- 能在同一个页面内同时写两个GridView控件吗?
- 问一个比较大不好回答的问题,关于类(class)问题
- 有关datagrid的小问题?
- 一个简单的问题:ImageButton放在TemplateColumn中,通过点击Imagebutton,怎样得到DataGrid某行某列的值。
- 一个存储过程在sql server里就对的,在asp.net一调用就出错。
- 约束文本框的格式问题(快速结帖)
- 经验问题:数据库默认值
- 请教
- VS2005声音播放控件怎么添加? 急急急
- 请问怎么获取SelectedIndexChanged事件中dropdownlist的原值
string[] stes=new string [3];
string[] stes=new string []{"a","b","c"};
第一行,创建字符串数组,里面有三个空字符串。
第二行,创建字符串数组,里面有三个字符串,字符串的内容分别是"a","b","c"。
string[] stes=new string []{"a","b","c"}; //声明数组并分配内存并初始化
这种写法相当于分配大小为 0 可以创建成功;
string[] x = new string[];这样没有分配大小会报错。
string[] stes2=new string []{}; //当然可以,初始化数组为空