Quick Reference
C# Syntax Quick Reference
Variables & Data Types
// Integer types
byte age = 25; // 0 to 255
short year = 2024; // -32,768 to 32,767
int count = 1000; // -2 billion to 2 billion
long bigNum = 1000000L; // Very large numbers
// Floating point
float price = 19.99f; // 7 digits precision
double pi = 3.14159; // 15-16 digits precision
decimal money = 99.99m; // 28-29 digits (for money!)
// Other types
bool isActive = true; // true or false
char letter = 'A'; // Single character
string name = "John"; // Text
// Nullable types
int? nullableInt = null; // Can be null
string? nullableString = null; // C# 8.0+
// Type inference
var number = 42; // Compiler figures out type
var text = "Hello"; // Still strongly typed!String Operations
Operators
Control Flow
Arrays
Collections
Methods
Classes
Inheritance
Interfaces
Exception Handling
LINQ Quick Reference
Basic LINQ Syntax
Chaining LINQ Operations
Async/Await Patterns
File I/O Quick Reference
JSON Serialization (System.Text.Json)
Common Patterns Cheat Sheet
Null Checking
Collection Initialization
String Formatting
Loops vs LINQ
Value vs Reference Types
Time Complexity Reference
Operation
List
Dictionary
HashSet
Array
LinkedList
Error Messages Decoder
Common Compiler Errors:
Common Runtime Errors:
Keyboard Shortcuts Reference
Visual Studio:
Action
Shortcut
VS Code:
Action
Shortcut
When to Use What?
Collections:
Loops:
String Operations:
Naming Conventions
Print This Page!
Last updated