Instantiating public properties and return them as controls

  • Thread starter Thread starter JohnDBCTX
  • Start date Start date
J

JohnDBCTX

Guest
Now I may have known this that properties (public and private) can return as void, integer, double, and so forth.

Can they return as a control type within a public class?

Here is the code snippet:

Users can assist me at their convenience.


Imports System.Data.SqlClient
Imports SQL_App_One.Form1
Imports System.Data
public class ClassOne

Public BndSrc As New BindingSource
Public DatGrd As New DataGridView
Public Property NameID() As Integer
Public Property LastName() As String
Public Property FirstName() As String


Public ReadOnly Property NamesArray() As String()
Get
Return New String() {NameID.ToString(), LastName, FirstName}
End Get
End Property

Public ReadOnly Property DataGridViews() As DataGridView()

Get
Return New DataGridView() {DatGrd}
End Get
End Property
Public ReadOnly Property BindingSources() As BindingSource()
Get
Return New BindingSource() {BndSrc}
End Get
End Property
end class

Regards,

JohnDBCTX



jp

Continue reading...
 
Back
Top