An object-oriented programming language developed by Microsoft that can be used in .NET.
You can create an animated GIF with GifBitmapEncoder, but it won't be animated in loop in Web browsers because Metadata will be missing
For this, you can do it with IWICBitmapEncoder and IWICMetadataQueryWriter with P/Invoke
(tested on Windows 10 1909, but a bit complex...)