A cautionary tale about performance issues that can arise when the types of parameters used in stored procedures don't match the types of underlying columns when such parameters are being used in WHERE clauses, causing implicit conversions and the 'Type conversion in expression (CONVERT_IMPLICIT()) may affect "CardinalityEstimate"' warning to be displayed in query plans.
Blog Articles and information on C# and .NET development topics
Recently I was updating a library that contains two keyed collection classes. These collections aren't the usual run-of-the-mill collections as they need to be able to support duplicate keys. Normally I'd inherit from
KeyedCollection but as with most collection implementations, duplicate keys are not permitted in this class. This article describes how I used T4 templates to dynamically generate my custom collection classes without requiring a public base class.
Normally when I load textures in OpenGL, I have a PNG file which I load into a
System.Drawing.Bitmap and from there I pull out the bytes and pass to
glTexImage2D. It works, but seems a bit silly having to create the bitmap in the first place. For this reason, I was toying with the idea of creating a very simple image format so I could just read the data directly when I came across a simple format named farbfeld. This article describes a basic encoder/decoder for C# along with my own thoughts.
Continuing the slowing forming tradition of looking at the tools I've used over the past year and comparing them with previous years
I've recently been working on a number of small test programs for the different sections which make up a game I'm planning on writing. One of these test systems involved a series of polyominoes which I needed to rotate. Internally, the data for these shapes are stored as a simple boolean array, which I access as though it were two dimensions. This article and corresponding source code download describe how to rotate 2D rectangular arrays (or 1D arrays that masquerade as 2D) in 90° intervals clockwise or anti-clockwise.
The second in a two part series showing how to write Adobe Stack Exchange (ase) files using C#
The first of a two part series which describes how to load and save Adobe Swatch Exchange (ase) files using C#. This first article describes the file format, and provides a full example project that will read RGB based swatch files.
This post details how to work around the "Build: Cannot use JSX unless the '--jsx' flag is provided." error you may receive when using the new TypeScript 1.6 Beta with Visual Studio 2015 to generate ReactJS components.
The new exception management library I've been working on was originally targeted for .NET 4.6, changing to .NET 4.5.2 when I found that Azure websites don't support 4.6 yet. Regardless of 4.5 or 4.6, this meant trouble when I tried to integrate it with WebCopy - this product uses a mix of 3.5 and 4.0 targeted assemblies, meaning it couldn't actually reference the new library due the higher framework version.
Rather than creating several different project files with the same source but different configuration settings, I decided that I would modify the library to target multiple framework versions from the same source project, and this article describes how I did this.
We recently created a a drop in replacement for the System.Windows.Forms.FontDialog component to avoid crashes when a user tries to select an invalid TrueType font.