Suffixes in practice; casting vs conversion; C# 6 object creation
Learn numeric suffixes in practice, the difference between casting and conversion, and how to write C# 6-friendly object creation (no target-typed new).
Lesson overview
Goal: Use numeric suffixes correctly, know when to cast vs convert, and create objects in C# 6 without target-typed new.
Suffixes in practice
Suffixes: use f for float (3.14f), m for decimal (10m), L for long (123L). Choose types for precision and range.
All lessons in this course
- Value vs reference; literals; var inference; const/readonly
- Operators & expressions: arithmetic, comparison, logical
- Suffixes in practice; casting vs conversion; C# 6 object creation