To run C# code on your local machine, you'll need the .NET SDK. An SDK is a development package that includes the compiler, runtime, and project tools. You can experiment in an online playground, but if you're going to build a real project, setting things up locally is the way to go.
csharp
# 1. Console app အသစ်တစ်ခု တည်ဆောက်မယ်
dotnet new console -o MyFirstApp
# 2. Project folder ထဲဝင်မယ်
cd MyFirstApp
# 3. Program ကို run မယ်
dotnet runSetup steps
- .NET SDK: install it. Once the SDK is installed, you can use the
dotnetcommand. - For a code editor, you can use Visual Studio Code or Visual Studio.
- In the terminal, type
dotnet --versionand check that a version number shows up. dotnet new consolecreates a console project, anddotnet runruns the program.
You should see
Hello, World!Info
⚠️ Common mistake
dotnet is not recognized usually means the SDK isn't installed, it's not on your PATH, or you haven't restarted your terminal yet.