Solution Explorer, References ShkolaClient Add Reference. Add Reference.
Projects Shkola. ,
OK
, 66. Select Shkola Selected Components, OK.

66 Add Reference.
ShkolaClient,
. Button1_Click:
Protected Sub
button1_Click(ByVal sender As Object, _
ByVal e As
System.EventArgs) Handles button1.Click
Dim Uchenik As New Shkola.Uchenik()
Uchenik.FirstName = "Boyan"
msgbox(Uchenik.FirstName)
End Sub
VB6, :
Dim Uchenik As New Uchenik()
,
. Shkola ;
(namespace). ,
namespace Uchenik.
Imports:
Imports Shkola
VB6 e :
Dim
Uchenik as Shkola.cUchenik
Set Uchenik = New Shkola.cUchenik
VB.NET, :
Dim KlasDascaliList As New
Collection()
Public ReadOnly Property KlasDascali(ByVal
iIndex As Integer) As KlasDascal
Get
Return CType(KlasDascaliList(iIndex),
KlasDascal)
End Get
End Property
. , KlasDascaliList Collection, Option Strict
Collection
KlasDascal.
CType
, , ( )
.
- (Default Properties)
(without parameters) . (property)
, (default).
KlasDascali Uchenik default property.
Default:
Default Public ReadOnly
Property _
KlasDascali(ByVal iIndex As
Integer) As KlasDascal
,
Uchenik.
:
Imports Shkola
...
Dim Uchenik As New Uchenik()
Dim Phys As New KlasDascal()
Phys = Uchenik.KlasDascali(1)
Phys = Uchenik(1) `
- (Constructors)
Uchenik,
;
Sub New, .
Constructors ,
. ,
Uchenik UchenikID, . ,
,
.
Sub New :
Public Sub New(Optional ByVal iUchenikID As Integer = 0)
,
:
Dim Uchenik As New Uchenik(1)
Dim Uchenik As Uchenik =
New Uchenik(1) `
-
.
Class...End Class ,
Sub New.
System . ComponentModel .Component,
. KlasDascali :
Public Class KlasDascal
Dim miPhysID As Integer
Public Property KlasDascalID()
As Integer
Get
Return miPhysID
End Get
Set
miPhysID = Value
End Set
End Property
Public ReadOnly Property Vuzrast()
As Single
Get
`get Date of Birth (DOB)-
` Vuzrast DOB
` Vuzrast
End Get
End Property
End Class