A strongly-typed, OOP language created by Microsoft.
C# code → compiled → IL (Intermediate Language) → JIT → native machine code
| Thing | Style | Example |
|---|---|---|
| Class | PascalCase | UserService |
| Method | PascalCase | CreateUser() |
| Public property | PascalCase | UserName |
| Local variable | camelCase | userName |
| Private field | _camelCase |
_userName |
var// when type is obvious
var x = 10; // int
var y = "hello"; // string
var user = new User();
var list = new List<int>();
// when type is unclear, DONT use
var x = GetData(); // what is x??
public var GetUser() // ❌ what will return??