Take it easy brother, I just brought plain examples, forget about the specific data.
1) I would never use Dim integer = "45", I just meant that you don't need to explicitly convert anything, and yes, sometimes when you are sure that the String's value is actually an integer you don't have to pass it to another Parse function.
2) Enums in vb can be automatically used as plain integers so u can use it in some cases even to make some calculations and conditions according to the order of it, not only but I make the numbers in my enum according to the desired calculations I expect later,
u can even use bit shift if you have very large enums with key values so u make the key values 8 16 32 and use bit shift etc. again, I just brought you examples to explain what I said but the examples are not the code, so chill about it.
3-4) I don't; Instead I write comments on every line.
And no, don't learn from me, this is just my taste, and if you really want to hear, sometimes I could write
Dim x As Integer
If x Then
Console.WriteLine("x <> 0") 'Will never reach this line since x =
0.
With the above example I mean 2 things, 1st, that integers can be evaluated as booleans, and 2nd, you can rely on the fact that integer is not nullable and bacomes automatically 0 when declaring the field.
Especially, this days that you can oficcially declare Dim x = 5 and the compiler automatically recognize it as integer and even provides full intellisense support.
I would agree with you concerning the readability issue, but I told you I am good with comments, besides I am not working with a group, so I am the one who decides about the coding conventions, and I do have strict conventions.
I would also say "Different strokes for different folks".
Personally, that's why I like VB, FLEXIBILITY!
Thanks for your post, would like further discussions
Best regards,
Shimmy Weitzhandler