tags:

views:

462

answers:

1

E.g. how do I get VB.Net to statically type a local variable to be the static type of the expression on the right had side of the assignment?

+10  A: 

Like this:

Dim myVar = 3

You'll also need

Option Infer On

(At the top of the file or in project settings)

See "Local Type Inference"

SLaks
Or "Option Infer On" in project settings, this can be set as the default through Tools->Options
Binary Worrier