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

更新时间:2020 年 6 月 20 日

已查看 767 次

开启您的 职业生涯

完成课程即可获得认证

开始学习
广告
© . All rights reserved.