what does this mean? "Dim [step] as String"

  • Thread starter Thread starter Vincent Finn
  • Start date Start date
V

Vincent Finn

Hi,

in some code I have there is a variable declared as
Dim [step] as String

what is the [] for in this case?

I thought it was an array at first but
as far as I can tell the variable is just a string

there is no compile error from putting the [] around it

Anyone able to cure my confusion?

Vin
 
Hi,

Any keyword when used as a variable name, will be enclosed in squre
brackets. Step is a keyword in Visual Basic .NET.

Hi,

in some code I have there is a variable declared as
Dim [step] as String

what is the [] for in this case?

I thought it was an array at first but
as far as I can tell the variable is just a string

there is no compile error from putting the [] around it

Anyone able to cure my confusion?

Vin
 
Vincent,

When you want to use a already given name in your own inherrited class, by
instance DataRow you can write it as [DataRow].

public sub readrows (byval [DataRow] as DataRow)

I hope this helps?

Cor
 
Vincent,

When you want to use a already given name in your own inherrited class, by
instance DataRow you can write it as [DataRow].

public sub readrows (byval [DataRow] as DataRow)

I hope this helps?

Cor

Thanks to the two of you

I am no longer confused :)

Vin
 
Back
Top