C#: Simple Program with Printing, Comments Etc.

Post Reply
User avatar
Jason
Site Admin
Posts: 767
Joined: Sun Dec 21, 2025 8:56 pm

Code: Select all

// This is a single-line comment.  

// simple-cs-program-with-examples.cs  (.cs is the extension for C # files)

using System;  

// Statements in C # end with a semicolon.

namespace SimpleCsExamples
{
	class SimpleCsExample1
	{
		static void Main(string[ ] args)
		{
			Console.WriteLine("Welcome to The Simple Program for C #.");
		}
	}
}

/* Here is a multi-line comment. 

 I hope you enjoyed The Simple Program for C #.*/

 

POSTREACT(ions) SUMMARY

Post Reply