请教一个自定义控件属性问题
本帖最后由 wuyazhe 于 2013-06-28 17:11:21 编辑 出现问题的类全体如下:
Public Class Chapter
Public Sub New()
m_Sections = new List(of Section)
End Sub
Private m_Sections As List(Of Section)
Public Property Sections() As List(Of Section)
Get
Return m_Sections
End Get
Set(ByVal value As List(Of Section))
m_Sections = value
End Set
End Property
Public Sub AddS(ByVal strContain As String)
m_Sections.Add(strContain)
End Sub
End Class
<Serializable()> Public Class Section
Public Sub New()
End Sub
Public Sub New(ByVal strName As String)
m_Name = strName.Trim
End Sub
Property Name() As String
Get
Return m_Name
End Get
Set(ByVal value As String)
m_Name = value
End Set
End Property
Private m_Name As String '单元名称
End Class