Top subtle (as a brick in the face) issues when converting my Tiny OS from C# to VB.NET:
(uint)(boundary * ((number / boundary) + ((number % boundary > 0) ? 1: 0)))where boundary is 16 and number is 82 returns 96. While "equivalent (not)" VB.NET CType(boundary * ((number / boundary) + IIf(number Mod boundary > 0, 1, 0)), Integer)where boundary is 16 and number is 82 returns 98 because (number / boundary) returns 5.25, not 5. This was fixed by using a backslash. CType(boundary * ((number \ (BACKSLASH) boundary) + IIf(number Mod boundary > 0, 1, 0)), Integer)This is one of these obvious, silly things you've known since VB3, but you don't think about it when converting from C# to VB.NET.
UInt32 isn't supported in VB, so I had to wimp out and switch to Integers.
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.
Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.