如何用 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.