-1
我收到错误消息“结构无法被索引,因为它没有默认属性”。任何人都可以告诉我我做错了什么?结构无法被索引,因为它没有默认属性
Public Structure Length8FixedString
<VBFixedString(8)> Public myFixedString As String '8 is the STRING length.
End Structure
Public Structure ExampleStructure2
<VBFixedArray(7)> Public myArray As Length8FixedString
End Structure
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim V As New ExampleStructure2
V.myArray(1) = "TIM" 'ERROR: Structure cannot be indexed because it has no default property
End Sub
End Class