W3School TIY Editor

  • W3School 在线教程
  • 改变方向
  • 暗黑模式
​x
 
using System;
​
namespace MyApplication
{
  class Program
  {
    static void Main(string[] args)
    {
      int myNum = 5;               // 整数(整型数)
      double myDoubleNum = 5.99D;  // 浮点数
      char myLetter = 'D';         // 字符
      bool myBool = true;          // 布尔值
      string myText = "Hello";     // 字符串
      Console.WriteLine(myNum);
      Console.WriteLine(myDoubleNum);
      Console.WriteLine(myLetter);
      Console.WriteLine(myBool);
      Console.WriteLine(myText);
    }
  }
}