古詩詞大全網 - 成語用法 - C# 提示錯誤 “常量中有換行符”和“字符文本中的字符太多”

C# 提示錯誤 “常量中有換行符”和“字符文本中的字符太多”

常量中有換行符是說妳在壹個字符串中輸入了回車,例如:String str="換

行";

在String.Format();中使用@符號可以識別。

tring sqlText =String.Format(@"select * from userinformation where name = '{0} ' and

password ='{1} '", Request["username"], Request["password"]);