Page 1 of 1

C#: Simple Program with Printing, Comments Etc.

Posted: Tue Feb 10, 2026 4:43 pm
by Jason

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 #.*/