.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> Collections >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

C# - Beginners - Use of Comment

Posted By:Sadhuryan       Posted Date: January 05, 2011    Points: 10    Category: Collections    URL: http://www.dotnetspark.com  

This is a program which illustrates the use of comment line.
 

using System;

namespace BeginnersTutorial
{
  public static class Program
  {

    //A simple C# program illustrates the use of comment line
    public static void Main()
    {
      //Single line comment always starts with //
      //It is used to leave some simple notes/remarks

      Console.ReadKey();

      /*Multiline Comments always starts with /* and ends with * /.
      It is always used to provide a brief description about the logic
      or about core of algorithm. 
      
      And Note: Comment will never be compiled by the compiler and it
      is only for the use of programmers/coders.*/
    }

  }
}


     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend