Bahasa

Referensi Cepat C#

Cheat sheet siap cetak untuk Referensi Cepat C#, disusun untuk pencarian cepat, belajar, dan referensi di meja

Sumber
Microsoft C# Documentation (learn.microsoft.com)
Lisensi
MIT
Diperbarui
2026-03-27

Contoh

Isi cheat sheet ini

  • Dasar
  • Tipe
  • Control Flow
  • Class
  • Interface
  • LINQ
  • Async/Await
  • Koleksi
  • Property
  • Exception

Hello World

Console.WriteLine("Hello, World!");  // top-level (C# 10+)
// Classic: class Program { static void Main() { ... } }

Build & Jalankan

dotnet new console -n MyApp   # create project
dotnet run                     # compile and run
dotnet build                   # compile only

Variabel & Konstanta

int x = 42;
var name = "Alice";           // type inference
const double Pi = 3.14159;
readonly int maxRetries = 3;  // set once, in ctor

Unduh cheat sheet lengkap dengan semua bagian, siap cetak

Unduh PDF

Unduhan

Pilih varian yang sesuai dengan cara Anda membaca