我有一块木材的数据结构。我已经建立了一个类来处理我想制作这个结构的长度成员的数据类型的维度(架构、公制等)。VB 说除非我将成员设为“共享”,否则我不能在定义中使用“新”。如果我将成员设为“共享”,当我尝试访问代码中的成员时,我将看不到数据。
Public Structure PieceInfo
Dim ProjectNumber As String
Dim ProjectName As String
Dim BuildingType As String
Dim BuildingNumber As String
Dim BLevel As String
Dim Batch As String
Dim Trussname As String
Dim Span As Single
Dim PieceName As String
Dim LumberType As String
Shared PieceLength As New clsDimension
Shared StockLength As New clsDimension
Dim LeftSplicePlate As String
Dim RightSplicePlate As String
End Structure
如何使用我的“clsDimension”对象作为结构的“Length”成员的数据类型?