Advertisement
AnitaN

02.PrimitiveDataTypesVariables/08.QuotesInString

Mar 9th, 2014
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1. //Problem 8.    Quotes in Strings
  2. //Declare two string variables and assign them with following value:
  3. //The "use" of quotations causes difficulties.
  4. //Do the above in two different ways: with and without using quoted strings. Print the variables to ensure that their value was correctly defined.
  5.  
  6. using System;
  7.  
  8. class QuotesInString
  9. {
  10.     static void Main()
  11.     {
  12.         string firstString = "The \"use\" of quotations causes difficulties.";
  13.         Console.WriteLine(firstString);
  14.         string secondString = @"The ""use"" of quotations causes difficulties.";
  15.         Console.WriteLine(secondString);
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement