C# Delegates and Events Explained with a Simple Example
What delegates and events are in C#, how to declare and raise an event with EventHandler, and the traps around unsubscribing and exceptions.
What delegates and events are in C#, how to declare and raise an event with EventHandler, and the traps around unsubscribing and exceptions.
Implement a thread-safe, lazily created singleton in C# with Lazy, compare it with double-checked locking, and know when dependency injection is the better choice.
Format dates in C# with custom patterns like yyyy-MM-dd and standard formats like “o”, plus a specifier table and the culture traps that change output.
Point GDAL at its data and plugin folders from C# with Gdal.SetConfigOption or environment variables, and why the order of calls matters.
Create and extract zip files in C# with ZipFile and ZipArchive: zip folders or file lists, build zips in memory and extract safely.