Try this
Sub Main
Dim outer As Integer = -1
Dim inner1 As Integer
Dim inner2 As Integer
Dim inner3 As Integer
Dim inner4 As Integer
inner1 = inner2 = inner3 = inner4 = outer
Console.WriteLine("{0},{1},{2},{3},{4}", inner1, inner2, inner3, inner4, outer)
End Sub
The result is
0,0,0,0,-1
So it doens't work in VB.NET like in C#
I was curious to find the differences in the IL code from VB.NET and C#.
Looking at the IL code it is obvious the reason for the lack of support in VB.NET
VB.NET IL code
IL_0001: ldc.i4.m1
IL_0002: stloc.s 04
IL_0004: ldloc.1
IL_0005: ldloc.2
IL_0006: ceq
IL_0008: ldc.i4.0
IL_0009: cgt.un
IL_000B: neg
IL_000C: ldloc.3
IL_000D: ceq
IL_000F: ldc.i4.0
IL_0010: cgt.un
IL_0012: neg
IL_0013: ldloc.s 04
IL_0015: ceq
IL_0017: ldc.i4.0
IL_0018: cgt.un
IL_001A: neg
C# IL Code for an equivalent example
IL_0001: ldc.i4.m1
IL_0002: stloc.0
IL_0003: ldloc.0
IL_0004: dup
IL_0005: stloc.s 04
IL_0007: dup
IL_0008: stloc.3
IL_0009: dup
IL_000A: stloc.2
IL_000B: stloc.1
The VB version goes on comparing the values, thus the problems is the = operator that in VB.NET has a double meaning. In this case is used to compare instead of to assign.