
传播超过一行的评论被称为多行注释 −
/* 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();
}
}
} 