2
Answers

Question on C# strings

ram a

ram a

15y
2.2k
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)