Answers for "create class syntax c#"

C#
0

How to create a class and objects in C#

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");
  }
}
Posted by: Guest on November-01-2021

C# Answers by Framework

Browse Popular Code Answers by Language