Interviews2 answers
What are the types of comment in C# ? ?
2 Answers
Three
Mukesh KumarPosted Sep 5, 2017, 12:12 AM EDT
1.Single line
Eg:
[csharp] //This is a Single line comment[/csharp]
Eg:
[csharp] //This is a Single line comment[/csharp]
2. Multiple line (/* */)
Eg:
[csharp] /*This is a multiple line comment
We are in line 2
Last line of comment*/[/csharp]
Eg:
[csharp] /*This is a multiple line comment
We are in line 2
Last line of comment*/[/csharp]
3.XML Comments (///)
Eg:
[csharp]/// summary;
/// Set error message for multilingual language.
/// summary[/csharp]
Eg:
[csharp]/// summary;
/// Set error message for multilingual language.
/// summary[/csharp]
Pavan RamamurthyPosted Aug 21, 2013, 1:10 AM EDT


