C# is a modern, object-oriented, type-safe programming language created by Microsoft. Type-safe means the compiler checks what kind of data goes into a variable. For example, if youint try to put text into an, it'll warn you before the program even runs.
csharp
// C# program တစ်ခုက class ထဲက Main method မှစတင်အလုပ်လုပ်ပါတယ်။
using System;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello from C#!");
}
}
}What this code does
using System;brings in built-in tools like Console so you can use them.namespaceorganizes your code into groups, kind of like folders.class Programis where you write the program's logic.Mainmethod is where the app starts running.Console.WriteLine()prints a line of text to the terminal.
You should see
Hello from C#!Info
🔎 Watch out for
In C#, most statements end with a semicolon ;. Forget it, and the compiler will immediately complain.