thc,
Yes I was joking.
My apologies if it wasn't explicit, English isn't my native language.
I have not learn this, but I've read similar redundant expressions and not always written in a language of VB family (VB, VBA, VB.NET).
I know VB and VB .NET aren't the same, but I was just joking about language, and, as far as I know VB.NET succeeds to VB and keeps most of its (crappy
<- joking?) features.
Anyway, I think any language (or language family) owns its 'culture' and the used language influences the way we are coding, this is essentially due to reproducing the read examples while learning.
For example the use of the prefix 'My' in naming variables is characteristic of the VB(A | .NET) culture, as is a tendency to verbosity.
By my side, I tend to be more verbose when I use C# than when I use LISP or F# (I don't use any language from VB family).
Kerry,
A little ConsoleApplication to illustrate Nothing (strange) behavior:
Sub Main()
Dim i As Integer = 0
Dim j As Integer = Nothing
Dim s As String = Nothing
Dim e As String = ""
Console.WriteLine("i = Nothing => {0}", i = Nothing)
Console.WriteLine("i = 0 => {0}", i = 0)
Console.WriteLine("j = Nothing => {0}", i = Nothing)
Console.WriteLine("j = 0 => {0}", i = 0)
Console.WriteLine("s = Nothing => {0}", s = Nothing)
Console.WriteLine("s Is Nothing => {0}", s Is Nothing)
Console.WriteLine("s = """" => {0}", s = "")
Console.WriteLine("e = Nothing => {0}", s = Nothing)
Console.WriteLine("e Is Nothing => {0}", s Is Nothing)
Console.WriteLine("e = """" => {0}", s = "")
End Sub
Output:
i = Nothing => True
i = 0 => True
j = Nothing => True
j = 0 => True
s = Nothing => True
s Is Nothing => True
s = "" => True
e = Nothing => True
e Is Nothing => True
e = "" => True
throws a compilation time error because i is a non nullable value type.