📜  如何在 C# 代码示例中创建类和对象

📅  最后修改于: 2022-03-11 14:49:11.735000             🧑  作者: Mango

代码示例1
class ClassName {
  static void printText(string text) {
    Console.WriteLine(text);
    Console.ReadLine();
    //Console.ReadLine(); is for keeping the window open
  }
  
  static void Main(string[] args) {
    //the object printText
    printText("Hello, World");
  }
}