Convert a Byte Array to an Image in C#
Load an Image from a byte array in C# without the “generic error occurred in GDI+” trap, plus the WPF BitmapImage version.
Load an Image from a byte array in C# without the “generic error occurred in GDI+” trap, plus the WPF BitmapImage version.
How try, catch and finally work in C#, with catch order, exception filters, rethrowing without losing the stack trace, and when finally does not run.
Time a block of code in C# with Stopwatch or Stopwatch.GetElapsedTime, read the result correctly, and know when to switch to BenchmarkDotNet.
Include or exclude code at compile time in C# with #if and #define, use DEBUG and target framework symbols, and know when [Conditional] is the better tool.
Read command-line arguments in a C# console app through args or Environment.GetCommandLineArgs, parse simple options, and pass arguments with dotnet run.