Advertisement
Guest User

Untitled

a guest
Feb 14th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. namespace StringInterpolation
  2. {
  3. class Program
  4. {
  5. static void Main(string[] args)
  6. {
  7. // copy Form objects to variables
  8. var username = Textbox1.Text;
  9. var password = Textbox2.Text;
  10.  
  11. var sqlSyntaxByInterpolation = $"INSERT INTO USERS (username, password) values ('{username}', '{password}')";
  12.  
  13. var sqlSyntaxByFormat = String.Format("INSERT INTO USERS (username, password) values '{0}','{1}'", username, password);
  14.  
  15. }
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement