Vidyalelo
C# Programming · Q17

Variables and Constants in C Sharp

Programming · C# Programming · question 17

Q17

What is the correct way to declare a constant string in C#?

A.
const MESSAGE = "Hello";
B.
MESSAGE const = "Hello";
C.
const string MESSAGE = "Hello";
Answer
D.
string MESSAGE = "Hello";

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board