Hello, I want to convert vb6.0 data type to vb.net. I tried it with decimal data type plz help me to convert following line in vb.net "dim totamt(1 to 20,100 to 200) as currency:GB_bonesrock:
In VB.NET the Currency data type is not available and the ability to create arrays with a lower bound greater than zero has been removed. Have a look at this article:-
To declare your array with the correct number of elements you would need to use:-
VB.NET:
Dim myDecimalArray(0 To 19, 0 To 99) As Decimal
'or
Dim myDecimalArray(19, 99) As Decimal
I have seen ways to get round this limitation on the internet but I would suggest that you get used to adopting the new principals introduced with .NET
You can then assign a value to your array and display it in a currency format as follows:-
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.