Public Property Name As String = "kkk" & nf.Users.Count提示不对,我想取得该如何做,谢谢!!!
Imports System.ComponentModel.Design
Imports System.ComponentModel
Imports System.Windows.Forms.Design
Imports System.Drawing.Design
Imports System.Drawing.Drawing2D
Imports System.Text
<Serializable()> _
<Designer(GetType(mytable))> _
Public Class Table
Inherits Control
Private _users As List(Of User) = Nothing
' Public hgf As Short = Users.Count
<TypeConverter("ExpandableObjectConverter")>
Public Class User
Private nf As Table
' <NotifyParentProperty(True)>
Public Property ID As Integer = 0
' <NotifyParentProperty(True)>
' Public Property Name As String = String.Empty
Public Property x1 As Single
Public Property x2 As Single
<NotifyParentProperty(True)>
Public Property Name As String = "kkk" & nf.Users.Count 'String.Empty
Public Property Name1() As bleCelll
Public Structure bleCelll
' Dim NEWtableCellBj As UserEnum
Dim x1 As Single
Dim x2 As Single
Dim Name As String
Dim cellcor As Color
End Structure
End Class
<DesignerSerializationVisibility(DesignerSerializationVisibility.Content)>
<TypeConverter("CollectionConverter")>
Public ReadOnly Property Users As List(Of User)
Get
If (_users Is Nothing) Then
_users = New List(Of User)
End If
Return _users
End Get
End Property
End Class
------解决方案--------------------------------------------------------