我终于通过使用以下方法解决了这个问题:
Imports Microsoft.VisualBasic
Imports System.ComponentModel
Public Class Rooms
Public Class Room1
Public Sub New()
Room1.AdultNumber = Nothing
Room1.ChildNumber = Nothing
Room1.Ages = Nothing
End Sub
<Bindable(True), DefaultValue(False)>
Public Shared Property AdultNumber As Byte = 0
<Bindable(True), DefaultValue(False)>
Public Shared Property ChildNumber As Byte = 0
<Bindable(True), DefaultValue(False)>
Public Shared Property Ages As String() = Nothing
End Class
Public Class Room2
Public Sub New()
Room2.AdultNumber = Nothing
Room2.ChildNumber = Nothing
Room2.Ages = Nothing
End Sub
<Bindable(True), DefaultValue(False)>
Public Shared Property AdultNumber As Byte = 0
<Bindable(True), DefaultValue(False)>
Public Shared Property ChildNumber As Byte = 0
<Bindable(True), DefaultValue(False)>
Public Shared Property Ages As String() = Nothing
End Class
Public Class Room3
Public Sub New()
Room3.AdultNumber = Nothing
Room3.ChildNumber = Nothing
Room3.Ages = Nothing
End Sub
<Bindable(True), DefaultValue(False)>
Public Shared Property AdultNumber As Byte = 0
<Bindable(True), DefaultValue(False)>
Public Shared Property ChildNumber As Byte = 0
<Bindable(True), DefaultValue(False)>
Public Shared Property Ages As String() = Nothing
End Class
Public Class Room4
Public Sub New()
Room4.AdultNumber = Nothing
Room4.ChildNumber = Nothing
Room4.Ages = Nothing
End Sub
<Bindable(True), DefaultValue(False)>
Public Shared Property AdultNumber As Byte = 0
<Bindable(True), DefaultValue(False)>
Public Shared Property ChildNumber As Byte = 0
<Bindable(True), DefaultValue(False)>
Public Shared Property Ages As String() = Nothing
End Class
Public Class Room5
Public Sub New()
Room5.AdultNumber = Nothing
Room5.ChildNumber = Nothing
Room5.Ages = Nothing
End Sub
<Bindable(True), DefaultValue(False)>
Public Shared Property AdultNumber As Byte = 0
<Bindable(True), DefaultValue(False)>
Public Shared Property ChildNumber As Byte = 0
<Bindable(True), DefaultValue(False)>
Public Shared Property Ages As String() = Nothing
End Class
End Class