Fast Bitmap Comparison in C# with LockBits and Span
Check whether two bitmaps have identical pixels in C#, hundreds of times faster than GetPixel, using LockBits and Span.SequenceEqual.
Check whether two bitmaps have identical pixels in C#, hundreds of times faster than GetPixel, using LockBits and Span.SequenceEqual.
Use reflection in C# to list a type’s methods and properties, read their parameters, create objects and call methods by name, and keep it fast.
Combine enum values with the [Flags] attribute in C#: how to define the values, set, clear, toggle and test flags, and the traps around zero and HasFlag.
Read the [Description] attribute of an enum value in C# with a short extension method, handle undefined values, and cache the result.