Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between // and /// in c#

When I type ///, Visual Studio shows me some parameters like this:

/// <summary>
/// 
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>

What is the difference between // and /// in C#?

like image 312
mohammad Avatar asked Dec 22 '13 06:12

mohammad


People also ask

What is the difference between && and || in C?

OR ( || ) - If EITHER or BOTH sides of the operator is true, the result will be true. AND ( && ) - If BOTH and ONLY BOTH sides of the operator are true, the result will be true. Otherwise, it will be false.

What is the difference between and || operator in C?

The | operator evaluates both operands even if the left-hand operand evaluates to true, so that the operation result is true regardless of the value of the right-hand operand. The conditional logical OR operator ||, also known as the "short−circuiting" logical OR operator, computes the logical OR of its operands.

What is the difference between '/' and operator?

Solution. The / operator is used for division whereas % operator is used to find the remainder.

What does <= mean in C?

Less than or equal to operator is a logical operator that is used to compare two numbers.


2 Answers

There is a big difference.

First: XML comments will be shown on tooltips and auto complete. Try writing XML comments and while writing the function notice how what you wrote in XML comments pops out while you type the function.

http://s2.postimg.org/7synvskzt/Untitled.png

Second: you can easily use tools to generate complete documentation.

See also the official explanation on MSDN

like image 59
Nahum Avatar answered Oct 10 '22 05:10

Nahum


The // comments are normal comments while /// comments are generally called xml comments. They can be utilized to make detailed help document for you classes.

http://msdn.microsoft.com/en-us/library/b2s063f7.aspx

like image 44
puneet Avatar answered Oct 10 '22 06:10

puneet