Home > Net >  $statement is modified into a string. The Format statement
$statement is modified into a string. The Format statement

Time:03-31

String sqlString=$" select AdminName, LoginId, Pwd from SyAdmin where LoginId={sysAdmin. LoginId} and Pwd={sysAdmin. LoginPwd} ";
This sentence how to change

CodePudding user response:

 
String sqlString=the string. Format (" select AdminName, LoginId, Pwd from SyAdmin where LoginId={0} and Pwd={1} ", sysAdmin. LoginId, sysAdmin. LoginPwd);

CodePudding user response:

733 response: refer to the original poster Yang Yi
string sqlString=$" select AdminName, LoginId, Pwd from SyAdmin where LoginId={sysAdmin. LoginId} and Pwd={sysAdmin. LoginPwd} ";
This sentence how to ah


Demo:
 string sqlStr=the string. Format (" select AdminName, LoginId, Pwd from SyAdmin where LoginId={0} and Pwd={1} ", sysAdmin. LoginId, sysAdmin. LoginPwd); 

CodePudding user response:

This,,,, because framework downgraded?
Or reduced vs version?

CodePudding user response:

They don't need will inject a hammer
  •  Tags:  
  • C#
  • Related