Together with a colleague, I’m giving basic .Net training for colleagues at this moment. Not at THIS moment exactly, because they’re doing exercises right now. But today is the second day of four days of training in total. Currently we already have two weird things popping up.

Last week we encountered significant inaccuracy when calculating values using doubles. For instance, when adding 0.1 to a double (instantiated at 0) several times, the value wondered off. After 3 or 4 times there was an inaccuracy of 2 or 3 in the last decimal. The difference is very very small, but it’s there… I knew there’s an inaccuracy in the representation of doubles, but I always thought it only occurred with difficult fractional values.

VB6 DLL’s are not always imported as you would expect. Visual Studio (2005) automatically generates interop assemblies when you reference a non .Net assembly. Today one of the course takers did this, which resulted in classes that didn’t have all the properties defined in the old DLL. There were two string properties having the exact same coding placed in different classes, and only one of them showed up in the interop assembly. Also, some properties showed up as properties, some showed up as methods (set_PropertyName()) and some of them didn’t show up at all. I’m currently investigating why, but it’s kind of weird…