1.1. ?????????? ? ????? ???????.
?????????? ???? ???????? ??????? - ?????????? ?????????? ?????????? ??? ????????? ?? ? ?????? ?????????? ?????? ??????.
? ?????? ?????? cls1: Public Prop1 As String
? ?????: Dim a as new cls1
a.Prop1="1"
??????, ? ?????? ?????? ?????????? ?????????? - ??? ?????????? ?? ???????? ?????????? ????????? ???????? ?? ????????????, ??? ?????-???? ?????? ???. ??? ????? ??????? ???????, ????? ????? ?? ????? ?????????? ?? UDT (????, ????????? ?????????????). ??????? ???????? ???????????????? ???????? ?????? ??????, ??????? ??????????? ? ????????????? ???????? ???????. ??? ????????? ????????? ????? ??????????? ??? ?? ????? ??????????.
??? ????? ????? ????? ???????????? Class Builder - ??????, ?????????? ? ????? ?????????? Visual Basic, ??????????? ??? ????? ?????? ??????, ???????? ? ??????? ??????.
??????? ??? ????? ????????? ??????? - Project/Add Class Module/VB Class Builder. ????? ?????? ???????? ???? Class Builder'?.
????????? ???? File/New/Class ??? ?????? Add New Class ?? ?????? ???????????? Class Builder'?, ???????? ????? ????? ? ???????. ??? ????? ?????????? ??????? ??? ??????, ? ?????? Based On ????? ??????? ??? ??????, ?? ??????? ??????? ??????????? ?????. ?? ??????? Attributes ????? ?????? ???????? ?????? ?????? (???????????), ? ????? ??? ??????????? ????? ??? ??????? ??????.
????? ????? ????????? File/New/Property, Method ??? Event ????? ????? ???????? ????????, ????? ??? ??????? ? ?????????? ??????. ????? ????? ???????????? ??????????? ?????? ?? ?????? ????????????.
??? ???????? ???????? ??? ???????????? ?????? ??? ???? ???, ???, ??????? ?????????, ? ????? ??????, ???????? ?? ?????? ???????? ????????? ?????? ?? ?????????. ?????? ????? ???????? ????? ???????????? ? ?????? ?? ???? ?????:
v Public Property (Let, Get, Set) - ????????? Private ?????????? ????????? ???? ? ??? ??? ??????????? Public ???????? ? ???????? ????? Get, Let ??? Set.
? Let - ?????????, ??????? ??????????? ???????? ????????. ????????????? ???????? ??? ??????? Private-??????????, ?.?. ??? ???????????? ????? ???????? ??????-???? ???????? ??????????? ??????????? ???, ? ??????? ?? ????????? ?????????? ???????? ?????? ????????????? Private-??????????. ????????????? ????????? ????? Let ???????????, ??? ??? ? ???? ?????? ??? ?????????, ??? ?????? ????????? ???????? ?????????? ??????? ???????? ????????.
? Get - ?????????, ??????? ????????? ???????? ???????? ??? ??? ???????, ??? ? ??? ??????? ??????????. ????????? ?????????? ???????? ????????.
? Set - ?????????, ??????? ????????????? ???????? ??? ??????-???? ???????. ????????? Set ???????????? ?????????? Let, ?? ???????? ?? ???????? ????????, ? ?????? ?? ??????.
?????? ? ???? ???? ???????? Let, Get, Set ???????? ???????? ????? ??????? ????????? ??? ????????.
v Friend Property (Let, Get, Set) - ??????? ????????, ????????????? ?????? ???????? ??????? ???????. ??? ???????? ????? ???????????? ?????? ?????? ?????? ????? ???????.
v Public Variable - ?????? ??????? Public ?????????? ??? ???????? ??????? Let, Get ??? Set ??? ???.
v Default Property - ???????? ?? ?????????. (? Label - Caption, ? TextBox - Text). ?????? ??????? ?????????? ????? ????? ????????, ??????? ?????? ???????????? Visual Basic, ???? ??? ???????? ? ???? ???? ?? ???????.
Textl = "Hello" '(??????????? Textl.Text = "Hello")
???????? ?????-?????? ???????? Public Property (Let, Get, Set). ???????? Class Builder, ?? ?????? Update... ???????? ??.
? ???????? ??????? ???????? ????? ????? Class Modules ? ? ??? ??? ?????? ??? ????????? ?????? ??????. ???????? ???? ?????? ?????? ??????? ?????? ?? ?????.
? ?????? ?????? ?? ??????? ?????????? ?????? ???????? ? ??? ??????????? ?????? - Let ? Get. ?? ?????? ????? ???????? ??? ???? ???????? ??? ????????? ??? ??? ???? ????????. ????????????? ???? ???????? ????????? ??????????? ???????????? ? ??????? VB.