• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 338
  • Last Modified:

Array of structure

How to declare fixed array size of structure

Private structure ProductInfo
  dim ProductName as string
  dim ProductPrice as single
End structure

Private products(6) as Productinfo  --- doesn't work
0
f_asmaa
Asked:
f_asmaa
1 Solution
 
RonaldBiemansCommented:
Strange it works for me, what is the error you get
0
 
Ignacio Soler GarciaCommented:
Yeah, this is correct.

Public Class Form1
    Private Structure ProductInfo
        Dim ProductName As String
        Dim ProductPrice As Single
    End Structure

    Private products(6) As ProductInfo

End Class

Compiled ok.

SoMoS
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now