如何在C#中编写多行注释?

来源:这里教程网 时间:2026-02-21 16:18:29 作者:

如何在c#中编写多行注释?

传播超过一行的评论被称为多行注释 −

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

编译器会忽略 /*...*/ 并在程序中添加注释。

以下是一个示例 C# 程序,显示如何添加多行注释 -

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

相关推荐