Thuta Learning
C#
BasicProgrammingအခြေခံ

Get Started (Setup)

C#သင်ခန်းစာ 320 မိနစ်

ဒီခန်းပြီးရင် ဘာတတ်သွားမလဲ

  • Get Started (Setup) ရဲ့core concept နဲ့runtime behavior ကိုရှင်းပြနိုင်ရန်
  • Normal, boundary နဲ့invalid cases ကိုကိုယ်တိုင်စမ်းနိုင်ရန်
  • Readable, type-safe နဲ့testable C# code ရေးနိုင်ရန်

ရိုးရိုးလေး ရှင်းပြမယ်

Get Started (Setup) ကို ရိုးရိုးလေးနားလည်မယ်

C# code ကို local computer မှာ run လုပ်ချင်ရင် .NET SDK လိုပါတယ်။ SDK ဆိုတာ compiler, runtime, project tools တွေပါတဲ့ development package ပါ။ Online playground မှာ စမ်းလို့ရပေမယ့် project တကယ်ရေးချင်ရင် local setup လုပ်ထားတာက ပိုကောင်းပါတယ်။

Problem → Why → Solution

ပြဿနာ — ဘာကြောင့် ဒီ concept လိုတာလဲ

SDK အသစ်တပ်ထားတာနဲ့ project target အလိုအလျောက်ပြောင်းမယ်လို့ယူဆခြင်းမမှန်ပါ။

ဖြစ်လေ့ရှိတဲ့အမှား

Happy path တစ်ခု run အောင်ရုံဖြင့် code မှန်ကန်၊ maintainable နဲ့production-ready ဖြစ်ပြီဟုယူဆခြင်း။

Core Concept — အလုပ်လုပ်ပုံကိုနားလည်မယ်

SDK တွင် compiler, CLI, templates နဲ့runtime ပါဝင်ပါတယ်။ 2026 တွင် .NET 10 LTS သည် supported LTS ဖြစ်ပြီး project အတွက် installed SDK, target framework နဲ့support lifecycle ကို `dotnet --info`၊ project file နဲ့official support page မှစစ်သင့်ပါတယ်။

Mental Model
  1. Typed input
  2. C# expression + method
  3. CLR value / object state

Get Started (Setup) ရဲ့core concept နဲ့runtime behavior ကိုရှင်းပြနိုင်ရန်

အဓိက Syntax / Pattern

csharp
# 1. Console app အသစ်တစ်ခု တည်ဆောက်မယ်
 dotnet new console -o MyFirstApp

# 2. Project folder ထဲဝင်မယ်
 cd MyFirstApp

# 3. Program ကို run မယ်
 dotnet run

SDK တွင် compiler, CLI, templates နဲ့runtime ပါဝင်ပါတယ်။ 2026 တွင် .NET 10 LTS သည် supported LTS ဖြစ်ပြီး project အတွက် installed SDK, target framework နဲ့support lifecycle ကို `dotnet --info`၊ project file နဲ့official support page မှစစ်သင့်ပါတယ်။

Code ကို အဆင့်လိုက်ဖတ်မယ်

  1. Typed input# 1. Console app အသစ်တစ်ခု တည်ဆောက်မယ်

    C# code ကို local computer မှာ run လုပ်ချင်ရင် .NET SDK လိုပါတယ်။ SDK ဆိုတာ compiler, runtime, project tools တွေပါတဲ့ development package ပါ။ Online playground မှာ စမ်းလို့ရပေမယ့် project တကယ်ရေးချင်ရင် local setup လုပ်ထားတာက ပိုကောင်းပါတယ်။

  2. C# expression + methodcd MyFirstApp

    SDK တွင် compiler, CLI, templates နဲ့runtime ပါဝင်ပါတယ်။ 2026 တွင် .NET 10 LTS သည် supported LTS ဖြစ်ပြီး project အတွက် installed SDK, target framework နဲ့support lifecycle ကို `dotnet --info`၊ project file နဲ့official support page မှစစ်သင့်ပါတယ်။

  3. CLR value / object statedotnet run

    `dotnet new console`, `dotnet restore`, `dotnet build` နဲ့`dotnet run` ကိုအဆင့်လိုက်စမ်းပြီး build error နဲ့runtime error ကိုခွဲပါ။

Execution Flow
  1. Typed input
  2. C# expression + method
  3. CLR value / object state

Success

Get Started (Setup) ရဲ့core concept နဲ့runtime behavior ကိုရှင်းပြနိုင်ရန်

Failure

SDK အသစ်တပ်ထားတာနဲ့ project target အလိုအလျောက်ပြောင်းမယ်လို့ယူဆခြင်းမမှန်ပါ။

C# code ကို local computer မှာ run လုပ်ချင်ရင် .NET SDK လိုပါတယ်။ SDK ဆိုတာ compiler, runtime, project tools တွေပါတဲ့ development package ပါ။ Online playground မှာ စမ်းလို့ရပေမယ့် project တကယ်ရေးချင်ရင် local setup လုပ်ထားတာက ပိုကောင်းပါတယ်။

csharp
# 1. Console app အသစ်တစ်ခု တည်ဆောက်မယ်
 dotnet new console -o MyFirstApp

# 2. Project folder ထဲဝင်မယ်
 cd MyFirstApp

# 3. Program ကို run မယ်
 dotnet run

Setup အဆင့်များ

  1. .NET SDK ကို install လုပ်ပါ။ SDK install ပြီးမှ dotnet command သုံးလို့ရပါတယ်။
  2. Code editor အနေနဲ့ Visual Studio Code သို့မဟုတ် Visual Studio သုံးနိုင်ပါတယ်။
  3. Terminal မှာ dotnet --version ရိုက်ပြီး version number ပေါ်လာလား စစ်ပါ။
  4. dotnet new console က console project ဖန်တီးပေးပြီး dotnet run က program ကို run ပေးပါတယ်။
You should see
Hello, World!

Info

⚠️ Common mistake

dotnet is not recognized လို့ပြရင် SDK မတပ်ထားတာ၊ PATH မဝင်တာ၊ သို့မဟုတ် terminal ကို restart မလုပ်ရသေးတာ ဖြစ်နိုင်ပါတယ်။

Real-world usage

လက်တွေ့ Project မှာ ဘယ်လိုသုံးမလဲ

`dotnet new console`, `dotnet restore`, `dotnet build` နဲ့`dotnet run` ကိုအဆင့်လိုက်စမ်းပြီး build error နဲ့runtime error ကိုခွဲပါ။

Mini challenge

ကိုယ်တိုင်တည်ဆောက်ကြည့်ပါ

`dotnet new console`, `dotnet restore`, `dotnet build` နဲ့`dotnet run` ကိုအဆင့်လိုက်စမ်းပြီး build error နဲ့runtime error ကိုခွဲပါ။

  • Example ကို copy မလုပ်ဘဲ ပြန်ရေးပါ
  • Normal input နဲ့ edge case စမ်းပါ
  • Run မလုပ်မီ compiler/output result ကိုခန့်မှန်းပါ
csharp
# 1. Console app အသစ်တစ်ခု တည်ဆောက်မယ်
 dotnet new console -o MyFirstApp

# 2. Project folder ထဲဝင်မယ်
 cd MyFirstApp

# 3. Program ကို run မယ်
 dotnet run

ရလဒ်: Get Started (Setup) ရဲ့core concept နဲ့runtime behavior ကိုရှင်းပြနိုင်ရန်

အရိပ်အမြွက် ကြည့်ရန်

`dotnet new console`, `dotnet restore`, `dotnet build` နဲ့`dotnet run` ကိုအဆင့်လိုက်စမ်းပြီး build error နဲ့runtime error ကိုခွဲပါ။

Quick Quiz 1 / 3

Get Started (Setup) ရဲ့ အဓိကသဘောတရားက ဘာလဲ။

Quick Quiz 2 / 3

ဘယ်အမှားကို အရင်ဆုံးရှောင်သင့်လဲ။

Quick Quiz 3 / 3

Real project မှာ ဘယ်လိုအသုံးချသင့်လဲ။

ဒီသင်ခန်းစာမှာ မှတ်ထားရမယ့်အချက်များ

  • Typed input → C# expression + method → CLR value / object state
  • SDK တွင် compiler, CLI, templates နဲ့runtime ပါဝင်ပါတယ်။ 2026 တွင် .NET 10 LTS သည် supported LTS ဖြစ်ပြီး project အတွက် installed SDK, target framework နဲ့support lifecycle ကို `dotnet --info`၊ project file နဲ့official support page မှစစ်သင့်ပါတယ်။
  • SDK အသစ်တပ်ထားတာနဲ့ project target အလိုအလျောက်ပြောင်းမယ်လို့ယူဆခြင်းမမှန်ပါ။
  • `dotnet new console`, `dotnet restore`, `dotnet build` နဲ့`dotnet run` ကိုအဆင့်လိုက်စမ်းပြီး build error နဲ့runtime error ကိုခွဲပါ။

.NET releases and support — Microsoft Learn

ဒီနေရာမှာ လူအများမှားတတ်တယ်

  • SDK အသစ်တပ်ထားတာနဲ့ project target အလိုအလျောက်ပြောင်းမယ်လို့ယူဆခြင်းမမှန်ပါ။
  • Happy path တစ်ခု run အောင်ရုံဖြင့် code မှန်ကန်၊ maintainable နဲ့production-ready ဖြစ်ပြီဟုယူဆခြင်း။

လက်တွေ့လေ့ကျင့်ခန်း

`dotnet new console`, `dotnet restore`, `dotnet build` နဲ့`dotnet run` ကိုအဆင့်လိုက်စမ်းပြီး build error နဲ့runtime error ကိုခွဲပါ။

အလုပ်ဖြစ်ကြောင်း ဒီလိုသိမယ်: Hello, World!

နောက်ဆုံးပြင်ဆင်ရက်

Progress ကို ဤ browser (ဤစက်) တွင်သာ သိမ်းထားပါသည်။ အခြားစက်များနှင့် sync မလုပ်ပါ။

ဤသင်ခန်းစာတွင် အမှားတွေ့ပါက အကြောင်းကြားရန်သင့် email app ကို ဤသင်ခန်းစာလိပ်စာ ဖြည့်ပြီးသားဖြင့် ဖွင့်ပေးပါမည် — သင်ကိုယ်တိုင် ပို့မှသာ ပို့မည်ဖြစ်သည်။

Get Started (Setup) | Thuta Learning