How to create a class and objects in csharp

Code Example - How to create a class and objects in csharp

                
                        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");
  }
}