Convert an Image to a Byte Array in C#
Turn a System.Drawing Image into a byte array in PNG, JPEG or its original format, and know when File.ReadAllBytes is the better answer.
Turn a System.Drawing Image into a byte array in PNG, JPEG or its original format, and know when File.ReadAllBytes is the better answer.
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.