It's the the gift giving season, which naturally has me thinking a lot about what makes a great gift. There's the ubiquitous gift card, which is almost always a safe bet, but can seem a bit impersonal in my opinion. Then there are gifts that aren't really gifts at all. Gifts like this seem like a great gift idea from the giver's perspective, but frequently end up having some real long term cost to the receiver. It's usually the big ticket items that fall under this category: cars, recreational vehicles,...
In the last post I was puzzled by what I thought were some inconsistencies between using the cast operator and Convert.ToInt32 when trying to convert an object typed as a decimal to an int. I had it tracked down at the ‘System.Convert’ class in the ‘mscorlib’ assembly we’ll find the following in the method definition for ‘ToInt32(object)’ using Reflector: All that’s going on here is we’re using the underlying type’s implementation of the ‘IConvertible’ interface to perform the conversion. The System.Decimal...