Used to declare fixed-sized arrays.
<System.AttributeUsage(System.AttributeTargets.Field, _ Inherited := False, AllowMultiple := False)> _ Public NotInheritable Class VBFixedArrayAttribute Inherits System.Attribute
Visual Basic .NET arrays are of variable length by default. This attribute is useful when using Visual Basic .NET file input and output functions, such as FileGet and FilePut that require fixed length arrays.
Structure Book <VBFixedArray(6)> Public Chapter() As Integer End Structure Sub WriteData() Dim FileNum As Integer = FreeFile() Dim MyBook As Book ' Add code here to populate the array. FileOpen(FileNum, "C:\testfile", OpenMode.Binary, _ OpenAccess.Write, OpenShare.Default) FilePut(FileNum, MyBook) ' Write data. FileClose(1) End Sub