请教string [] s="112345" 和string s="12345"有什么区别


请问string [] s="112345" 和string s="12345"有什么区别?
请问string   []   s= "112345 "   和string   s= "12345 "有什么区别?
调用起来有什么不一样吗?

C#语言 .net 程序开发

我就是⑨~ 12 years, 3 months ago


try..

string[] s = new string[] { "12345 " };

很正常的ID answered 12 years, 3 months ago


string [] s= "112345 ";

编译有误: "无法将string类型隐式转换为string[] "..

妹子萌一个 answered 12 years, 3 months ago


TO:string [] s= "112345 "
相當於
string[] s = new string[1]{ "112345 "};


string [] s= "112345 "能够编译通过 不要误导楼主啊...

rendan answered 12 years, 3 months ago


看了楼上的回复,很为 希赛 担心

油库里九号 answered 12 years, 3 months ago


寒...2-8楼成心误导lz吗?

hulllo answered 12 years, 3 months ago


区别就是一个编译错误
一个编译成功


Senoya answered 12 years, 3 months ago


mark

自动·圆珠笔 answered 12 years, 3 months ago


leraned

刚大木附体 answered 12 years, 3 months ago


string [] s= "112345 "
这样编译真的能通过

卡尔-艾尔 answered 12 years, 3 months ago


呵呵

星星都跟着胡扯

帕秋莉·诺雷姬 answered 12 years, 3 months ago


哈哈,都没注意这个问题

lplql answered 12 years, 3 months ago


string[] str = new string[] { "1234 " };
这样是可以的

偶是loli answered 12 years, 3 months ago


string [] s= "112345 "
这样编译真的能通过

noir87 answered 12 years, 3 months ago

Your Answer