jm,

No its not a glitch as I admitted to above. It's one of the things VB.Net does to make itself compatible (for better or worse) with prior versions of VB. This particular one while somewhat innocuous in one case, prevented the built-in error checking from flagging your improper use of "Environment.SpecialFolder.Windows" (an Enum value of type Integer).

One other operator that you should be cognizant of is the equality operator for strings. i.e.:
Code:
If FredVar = "Fred" Then
Its behavior is governed by either setting Option Compare to either "Text" or "Binary". It also treats empty strings as being equal to Nothing (null). Therefore, your best bet to make certain that your code behaves as expect when doing string comparisons for equality is to use one of the String.Equals methods.