views:

356

answers:

1
+3  A: 

It's safe to do that. You can test it by trying to compile the following:

Dim x As Integer
Select Case x
    Case 6
        Dim z As Integer = 6
    Case 7
        Dim z As Integer = 7
End Select
Console.Write(z)

And noting that you'll get a compile error.

Of course it cuts down on readability IMO. Maybe you should declare it at the beginning of the procedure anyway.

Spencer Ruport