How to write multi-line comments in C#?

CsharpProgrammingServer Side Programming

The comments that spread more than one line is called multi-line comments −

/* The following is a multi-line
Comment In C#
/*

The /*...*/ is ignored by the compiler and it is put to add comments in the program.

The following is a sample C# program showing how to add MULTI-line comments −

using System;

namespace Demo {
   class Program {
      static void Main(string[] args) {

         /* The following is a multi-line
         Comment In C#
         /*
         // printing
         Console.WriteLine("Hello World");
         Console.ReadKey();
      }
   }
}
raja
Published on 08-Aug-2018 15:22:10
Advertisements