Category Archives: C#
SafeArrayTypeMismatchException
We extended our legacy C++ DCOM application last week, and when the developer wrote the C#.Net end to call the new method, we were getting the error: System.Runtime.InteropServices.SafeArrayTypeMismatchException The developer that had added the method stated it work, and pointed … Continue reading
Creating Palette based GIFs
A question was asked on the mailing list (ages ago) about creating 8-bit GIF files. I proved this code for simple palette based GIFs, so here it is: using System; using System.Drawing; using System.Drawing.Imaging; using System.Runtime.InteropServices; namespace Project { class … Continue reading
Loving the Visual Studio 2008 compiler
I have been finding lambda and extension methods really helpful in my game port. Blobs of C styled single linked list code, when changed to generic lists boil down to one line. like this: Item item = player.itemsPtr; while (item … Continue reading
CodeCamp: Delegates
Wow, I’m sitting here in a C# 3.0 – A Whirlwind Tour talk, and the group has stalled on Delegates, a .Net 1.0 feature. Anonymous Delegates lost more people, Lambda functions are now messing with peoples heads…. Eeek, this is … Continue reading
TimeDirection graph
A work college was wanting some trivial code to draw a time based direction plot, and insisted that I do it. So here is my drawing class: using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; namespace LineCurve { public class … Continue reading