Question VB6.0 conversion code gives error in VB.Net 2010

sth_syed

Member
Joined
Aug 26, 2010
Messages
6
Programming Experience
Beginner
Hello,

i have a decalre statement in vb6.0 Dim mydrvlabel As String * 256
when i declare same thing here it gives error.

Can you please tell what is equivalent declaration in vb.net 2010 .

Thanks
 
That is the VB6 way of specifying a String as being a specific length. There is no specific equivalent in VB.NET. If you need this for a Windows API call or the like, look at using the VBFixedString attribute. If you don't need it for that then you don't need it at all so just use a regular String declaration.
 
Back
Top