A Generic Cache Manager in C# with MemoryCache
A small, thread-safe generic cache manager in C# built on MemoryCache from Microsoft.Extensions.Caching.Memory, with expiration, GetOrCreate and size limits.
A small, thread-safe generic cache manager in C# built on MemoryCache from Microsoft.Extensions.Caching.Memory, with expiration, GetOrCreate and size limits.
Resize an image in C# with System.Drawing at high quality, keep the aspect ratio, avoid gray edges and control JPEG quality when saving.
Play WAV files with SoundPlayer and MP3 files with NAudio or Windows Media Player in C#, synchronously or in the background, and await the end.
Sort a WinForms ListView by the clicked column, toggle ascending and descending, and sort numbers and dates by value instead of as text.
Check whether two bitmaps have identical pixels in C#, hundreds of times faster than GetPixel, using LockBits and Span.SequenceEqual.