adspace


What are the different types of comments in c#?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an abstract class c#?

969


What is expression tree in c#?

998


Why can't we use a static class instead of singleton?

954


How to assign Null value to Var?

1064


Which namespaces are necessary to create a localized application?

1142


How do you inherit a class into other class in c#?

995