Dependency Injection in C#
Register and inject services via constructor injection (.NET DI).
Register and inject services via constructor injection (.NET DI).
Understand GC generations and when to implement IDisposable.
Wrap risky code and clean up with finally or using declarations.
Throw exceptions and create domain-specific exception types when useful.
Use File.ReadAllText/WriteAllText and stream-based APIs for large files.
Serialize/deserialize JSON with System.Text.Json (or Newtonsoft.Json).
Convert objects to JSON/XML/binary formats and back safely.