鉴于public String(char*)
为什么我们不能使用以下语句?为什么string str = new string(“abc”)不能通过编译器?
string str = new string("aaa");
错误1
为 'string.String(字符*)' 最好的重载的方法匹配具有一些 无效 参数C:\ TEMP \ ConsoleApplication2 \ ConsoleApplication2 \ 19的Program.cs 26个ConsoleApplication2
错误2
参数1:不能从 '字符串' 转换为 '字符*' C:\ TEMP \ ConsoleApplication2 \ ConsoleApplication2 \的Program.cs 19 37 ConsoleApplication2
这是我需要的:) -thx – q0987 2011-06-01 20:50:24