What are the types of comment in c# with examples?



What are the types of comment in c# with examples?..

Answer / Kumar Awakash

There are three types of comments in C#: 1) Single-line comments (//), 2) Multiline comments (/* */), and 3) XML documentation comments (/// or /**/). An example of each is as follows: single-line comment: // This is a single-line comment. multiline comment: /* This is a multiline comment. It can span multiple lines. */ XML documentation comment: /// <summary>This is an XML documentation comment.</summary>

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

FOR EXAMPLE : CLASS Dotnet { } creating object: Dotnet dn=new Dotnet(); NOW THE QUESTION IS WHICH IS CALLED AS OBJECT ? EITHER dn OR new Dotnet() and CAN YOU PROVE YOUR ANSWER????? PLEASE REPLY...

2 Answers  


Explain when should you call the garbage collector in .net?

1 Answers  


Hello Friends..am Mohammed riyash..final year BCA in Jamal Mohamed College 2009. Trichy. My doubt is while connecting SQL2005 Built in Database withing the Visual Studio 2005 Framework.. I am getting the error.. That " An Error occurred and it may be due to , under the default settings of the Server, the connection cannot be established.." But the code works in MS Access for me.. Both in VB.Net and C#.Net am getting the same error.. Any genius please Message me to 9994558822 or mail me.. riyash.ips@gmail.com

3 Answers  


Describe the parts of assembly.

1 Answers  


Write a syntax for writing a event delegate.

1 Answers  


What does mean c#?

1 Answers  


What is executenonquery c#?

1 Answers  


How does a while loop work?

1 Answers  


What is Reflection in .NET? Namespace? How will you load an assembly which is not referenced by current assembly?

1 Answers  


Explain the ways to deploy an assembly?

1 Answers  


How is the syntax written to inherit from a class in C#?Give an example ?

1 Answers   Siebel,


Why do we write system in c#?

1 Answers  


Categories