Home  >  Article  >  Backend Development  >  How to write multi-line comments in C#?

How to write multi-line comments in C#?

WBOY
WBOYforward
2023-08-28 20:45:091240browse

How to write multi-line comments in C#?

Comments that spread over more than one line are called multiline comments −

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

The compiler ignores /*...*/ and adds comments to the program.

The following is a sample C# program showing how to add a multi-line comment -

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();
      }
   }
}

The above is the detailed content of How to write multi-line comments in C#?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete