Picking up C#, can't seem to find any useful reference to this, other than examples.
So, what is Dim in C#?
Dim declares a variable of a particular type (or of variable type, if you don't specify one). If you
Dim x as Foo, that declares a variable of type
In C#, the equivalent is to state the type followed by the variable's name, as in:
Foo x; int i;
You can also assign in the same step:
Foo x = new Foo(); int i = 6;
C# supports type inference, so you can also do:
// Compiler infers type of x and i based on this assignment. var x = new Foo(); // x is now of type Foo var i = 10; // i is now of type int
Dim without a corresponding type in VB is similar to declaring a type as
Object in C#:
object o = ...; // An object instance can hold any value or reference type.