Unfortunatly VB.net doesnt seem to allow me to define the lenght of the array (Public InvTaxFlag(3)) in a stucture...
Main Topics
Browse All TopicsI have this VB6 Datatype that I need to convert to VB.NET I have no clue how to handle the arrays... Little help??
Type BVInventoryRecord
InvWhse As String * 6
InvPartCode As String * 34
InvDescription As String * 80
InvProductCode As String * 10
InvLocation As String * 20
InvOnHoldFlag As String * 1
InvCurrentCost As String * 17 'Mask ±##########.#####
InvAverageCost As String * 17 'Mask ±##########.#####
InvSellingPrice(1 To 20) As String * 17 'Mask ±##########.#####
InvPromoStartDate As String * 8
InvPromoEndDate As String * 8
InvPromoFlag As String * 1
InvPromoMandatoryFlag As String * 1
InvPromoSellingPrice As String * 17 'Mask ±##########.#####
InvQuantityBreak(1 To 9) As BVQuantityBreaks
InvTaxFlag(1 To 4) As String * 1
InvMeasure As String * 10
InvCurrentPONo As String * 10
InvPODueDate As String * 8
InvMinBuyQty As String * 11
InvDiscountableFlag As String * 1
InvSerializedFlag As String * 1
InvSalesAccount As String * 4
InvOnHandQty As String * 17 'Mask ±##########.#####
InvReorderPointQty As String * 17 'Mask ±##########.#####
InvCommittedQty As String * 17 'Mask ±##########.#####
InvBackOrderQty As String * 17 'Mask ±##########.#####
InvOnOrderQty As String * 17 'Mask ±##########.#####
InvAltPartWarehouse As String * 6
InvAltPartCode As String * 34
InvMisc1 As String * 30
InvMisc2 As String * 17 'Mask ±##########.#####
InvSalesByPeriod As BVSalesByPeriod
InvType As String * 1
InvImageFileName As String * 261
InvWeight As String * 13 'Mask ±######.#####
InvECommerceFlag As String * 1
InvUPCCode As String * 40
InvPreferredVendor As String * 20
InvXtdDesc As String * 5000
InvUomDesc As String * 80
InvAllowBackOrders As String * 1
InvAllowReturns As String * 1
End Type
So far I have:
Structure BVInventoryRecord
<VBFixedString(6), System.Runtime.InteropServ
<VBFixedString(34), System.Runtime.InteropServ
<VBFixedString(80), System.Runtime.InteropServ
<VBFixedString(10), System.Runtime.InteropServ
<VBFixedString(20), System.Runtime.InteropServ
<VBFixedString(1), System.Runtime.InteropServ
<VBFixedString(17), System.Runtime.InteropServ
<VBFixedString(17), System.Runtime.InteropServ
But then I hit the arrays and Im not sure how to represent them
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: lluddenPosted on 2008-11-21 at 16:27:00ID: 23018221
I believe this will work. Something similar worked for me on a conversion project a while back.
<VBFixedArray(4)> Public InvQuantityBreak(8) As BVQuantityBreaks
<VBFixedArray(4)> <VBFixedString(1)> Public InvTaxFlag(3) As String
Remember that in .NET, arrays all are zero indexed.