Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Basic 6.0 to VB.NET declaration

How do I declare "as any" in VB.NET, or what is the equivalent?

like image 648
user11420 Avatar asked Jun 25 '26 22:06

user11420


1 Answers

The closest you can get is:

Dim var as Object

It's not exactly the same as VB6's as Any (which stores values in a Variant) but you can store variables of any type as Object, albeit boxed.

like image 166
Grokys Avatar answered Jun 27 '26 23:06

Grokys



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!