What are the different types of comments in c#?



What are the different types of comments in c#?..

Answer / Renu Sirohi

C# offers three types of comments:

1. Single-line comment (//): It starts with two forward slashes (//) and extends to the end of the line.
2. Multi-line comment (/* */): This type of comment can span multiple lines, as it begins with /* and ends with */.
3. Verbatim multi-line comment (@): This is used for embedding C++ or SQL code inside a string in C#. It starts with @ followed by three double quotes (""").

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is singleordefault c#?

1 Answers  


What is boolean method?

1 Answers  


What is ildasm and obfuscator in net?

1 Answers  


What is the use of "default" and "Using" keyword?

3 Answers   TCS,


What is overriding in c#?

1 Answers  


what is collections and what is generics

4 Answers   Bally Technologies,


What is multicast delegate explain with example?

1 Answers  


What is instantiating a class?

1 Answers  


Why do you call it a process? What’s different between process and application in .net, not common computer usage, terminology?

1 Answers  


In which order the destructor is called for an inherited class?

1 Answers  


Is c# lazy thread safe?

1 Answers  


How can I produce an assembly?

1 Answers  


Categories