1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
saw5 [17]
3 years ago
11

Using C#, declare two variables of type string and assign them a value "The "use" of quotations causes difficulties." (without t

he outer quotes). In one of the variables use quoted string and in the other do not use it.
Computers and Technology
1 answer:
stich3 [128]3 years ago
8 0

Answer:

Let the two string type variables be var1 and var2.  The value stored in these two variables is : The "use" of quotations causes difficulties.

  • The variable which uses quoted string:

          string var1 = "The \"use\" of quotations causes difficulties.";  

  • The variable which does not use quoted string:

string var2 = "The " + '\u0022' + "use" + '\u0022' + " of quotations causes difficulties.";

  • Another way of assigning this value to the variable without using quoted string is to define a constant for the quotation marks:

const string quotation_mark = "\"";

string var2 = "The " + quotation_mark + "use" + quotation_mark + " of quotations causes difficulties.";

Explanation:

In order to print and view the output of the above statements WriteLine() method of the Console class can be used.

   Console.WriteLine(var1);

   Console.WriteLine(var2);

In the first statement escape sequence \" is used in order to print: The "use" of quotations causes difficulties. This escape sequence is used to insert two quotation marks in the string like that used in the beginning and end of the word use.

In the second statement '\u0022' is used as an alternative to the quoted string which is the Unicode character used for a quotation mark.

In the third statement a constant named  quotation_mark is defined for quotation mark and is then used at each side of the use word to display it in double quotations in the output.

You might be interested in
Why do we need to update database regularly
sergiy2304 [10]
To protect from attackers gaining access by sitting on a certain configuration too long. 
7 0
3 years ago
In the RGB model, which color is formed by combining the constituent colors?
iogann1982 [59]
If you combine maximum values of Red Green and Blue you will get white.
4 0
3 years ago
Read 2 more answers
What should a pie chart represent?
Crazy boy [7]

Answer:

Data that adds up to 100%

Explanation:

7 0
2 years ago
Makes it possible to treat dates as other numbers
Vera_Pavlovna [14]
What do you mean?  <span>Makes it possible to treat dates as other numbers</span> 
8 0
3 years ago
Before starting a spreadsheet, it is smarter to plan ahead and think through the design. true or false
Nesterboy [21]
True. THe axis order (horizontal/vertical) for instance, can cause a serious headache to you when organized wrong.
The same goes with functions, it's better to check them mentally/in a piece of paper beforehand.
6 0
3 years ago
Other questions:
  • As you move the click and type pointer around the document, the icon changes to represent ____________________ that will be appl
    10·2 answers
  • Because so many newspapers now have online versions of their publications, many observers feel that "circulation" is an insuffic
    11·1 answer
  • You are going to buy a computer but first you want to do some research to help you select the best model everfi answer
    11·1 answer
  • The picture that graphically represents the items you use in windows is called a/an
    15·2 answers
  • Trevor owns a manufacturing business that makes specialized hiking and rock climbing gear. He is a very small player in the mark
    8·1 answer
  • What are 2 main differences betweenarrays andstructs?
    7·1 answer
  • As related to the use of computers, ____ is defined as gaining unauthorized access or obtaining confidential information by taki
    10·1 answer
  • Wireless technology is best described as a/an
    7·2 answers
  • State four reasons why office automation is adopted in business establishment?​
    7·1 answer
  • Hey guys,i have a question. 2x + 7x + 1y.how do i simplify it
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!