Comments in C#

By: Ram Baskar Emailed: 1674 times Printed: 2154 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

C# utilizes a double forward slash (//) to indicate the rest of the line is a comment. This is inherited from C++.

public class Foo
{
    // a comment
    public static void Bar(int firstParam) {}  //Also a comment
}
Multi-line comments can be indicated by a starting forward slash/asterisk (/*) and ending asterisk/forward slash (*/). This is inherited from standard C.
public class Foo
{
    /* A Multi-Line
       comment  */
    public static void Bar(int firstParam) {}  
}

Csharp Home | All Csharp Tutorials | Latest Csharp Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Ram Baskar
Hello World sample program in C#
Comments in C#
Preprocessor directives in C#
Boxing and unboxing in C#
Categories of datatypes in C#
Major features of C#
Which version of C# to use?
History of C#?
Why it was named C#?
Design Goals of C#
What is C#?
A complete sample program in AJAX
Handling the Server Response in AJAX
How to Make an HTTP Request in AJAX

More Tutorials in Csharp
Major features of C#
Categories of datatypes in C#
Boxing and unboxing in C#
Preprocessor directives in C#
Comments in C#
Hello World sample program in C#
SOAP serialization in C#
What is C#?
Design Goals of C#
Why it was named C#?
History of C#?
Which version of C# to use?
Convert Image to Base64 String in C#
Convert Base64 String to Image in C#

More Latest News
Most Viewed Articles (in Csharp )
Major features of C#
Why it was named C#?
History of C#?
Hello World sample program in C#
What is C#?
Categories of datatypes in C#
Comments in C#
Convert Image to Base64 String in C#
Convert Base64 String to Image in C#
SOAP serialization in C#
Design Goals of C#
Which version of C# to use?
Boxing and unboxing in C#
Preprocessor directives in C#
Most Emailed Articles (in Csharp)
Why it was named C#?
History of C#?
Hello World sample program in C#
Major features of C#
Convert Image to Base64 String in C#
Convert Base64 String to Image in C#
Which version of C# to use?
SOAP serialization in C#
What is C#?
Design Goals of C#
Boxing and unboxing in C#
Preprocessor directives in C#
Comments in C#
Categories of datatypes in C#