开发者

string s= @"somet"hing" what is wrong about this?

I expected that there is no something wrong but VS2010 gives error.

s开发者_如何学运维tring s= @"somet"hing";


You need to double-up quotation marks within an @ string.

string s = @"somet""hing";

Otherwise how would it know which quotes were escapes and which were the end markers?

Refer to the MSDN string page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜