2
Answers

Question on C# strings

Photo of ram a

ram a

16y
2.6k
1

Hi All,
Could some one explain me the difference between the 2 lines below.
string sql = @"SELECT columnname " +
      @"FROM tablename " +
      @"WHERE ID = '" + settingId + "' ";
 
string sql = "SELECT columnname " +
      "FROM tablename " +
      "WHERE ID = '" + settingId + "' ";
 
Does '@' in the first statement makes any difference?
 

Answers (2)