{"id":1262,"date":"2016-09-08T08:46:00","date_gmt":"2016-09-08T06:46:00","guid":{"rendered":"https:\/\/developers.sd\/%d9%83%d9%8a%d9%81%d9%8a%d8%a9-%d8%a7%d8%b3%d8%aa%d8%ae%d8%af%d8%a7%d9%85-%d8%a7%d9%84%d8%a3%d8%ad%d8%af%d8%a7%d8%ab-events-%d9%88%d8%a7%d9%84%d8%aa%d8%b9%d8%a7%d9%85%d9%84-%d9%85%d8%b9%d9%87%d8%a7\/"},"modified":"2026-08-14T15:13:15","modified_gmt":"2026-08-14T13:13:15","slug":"%d9%83%d9%8a%d9%81%d9%8a%d8%a9-%d8%a7%d8%b3%d8%aa%d8%ae%d8%af%d8%a7%d9%85-%d8%a7%d9%84%d8%a3%d8%ad%d8%af%d8%a7%d8%ab-events-%d9%88%d8%a7%d9%84%d8%aa%d8%b9%d8%a7%d9%85%d9%84-%d9%85%d8%b9%d9%87%d8%a7","status":"publish","type":"post","link":"https:\/\/developers.sd\/?p=1262","title":{"rendered":"\u0643\u064a\u0641\u064a\u0629 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0623\u062d\u062f\u0627\u062b Events \u0648\u0627\u0644\u062a\u0639\u0627\u0645\u0644 \u0645\u0639\u0647\u0627 \u0641\u064a \u0644\u063a\u0629 \u0633\u064a \u0634\u0627\u0631\u0628 #C"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/academy.hsoub.com\/uploads\/monthly_2016_09\/learn-csharp-events.png.3435391c36d4f1accabc15f38172428c.png\"\/><\/p>\n<p> \t\u0639\u0646\u062f\u0645\u0627 \u062a\u0639\u0645\u0644 \u0639\u0644\u0649 \u062d\u0627\u0633\u0648\u0628\u0643 \u0627\u0644\u0634\u062e\u0635\u064a\u060c \u0623\u0648 \u062d\u062a\u0649 \u0639\u0644\u0649 \u0647\u0627\u062a\u0641\u0643 \u0627\u0644\u0630\u0643\u064a\u0651\u060c \u0623\u0648 \u0631\u0628\u0651\u0645\u0627 \u0633\u0627\u0639\u062a\u0643 \u0627\u0644\u0630\u0643\u064a\u0651\u0629. \u0641\u0623\u0646\u062a \u062a\u0633\u062a\u062e\u062f\u0645 \u0627\u0644\u0623\u062d\u062f\u0627\u062b \u0622\u0644\u0627\u0641 \u0627\u0644\u0645\u0631\u0651\u0627\u062a. \u0627\u0644\u062d\u062f\u062b \u0647\u0648 \u0648\u0633\u064a\u0644\u0629 \u062c\u0645\u064a\u0644\u0629 \u0644\u0644\u062a\u0639\u0628\u064a\u0631 \u0639\u0646 \u0623\u0645\u0631 \u0637\u0627\u0631\u0626 \u062d\u062f\u062b \u0644\u0643\u0627\u0626\u0646 \u0628\u0631\u0645\u062c\u064a\u0651. \u0642\u062f \u064a\u0643\u0648\u0646 \u0647\u0630\u0627 \u0627\u0644\u0623\u0645\u0631 \u0627\u0644\u0637\u0627\u0631\u0626 \u0639\u0628\u0627\u0631\u0629 \u0639\u0646 \u0646\u0642\u0631\u0629 \u0632\u0631 \u0641\u0623\u0631\u0629\u060c \u0623\u0648 \u0639\u0646 \u0644\u0645\u0633\u0629 \u0639\u0644\u0649 \u0634\u0627\u0634\u0629 \u062c\u0647\u0627\u0632\u0643 \u0627\u0644\u0630\u0643\u064a. \u0623\u0648 \u0636\u063a\u0637\u0629 \u0645\u0641\u062a\u0627\u062d \u0645\u0646 \u0644\u0648\u062d\u0629 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d \u0627\u0644\u062e\u0627\u0635\u0651\u0629 \u0628\u064a \u0648\u0623\u0646\u0627 \u0623\u0643\u062a\u0628 \u0647\u0630\u0627 \u0627\u0644\u0645\u0642\u0627\u0644\u060c \u0623\u0648 \u0623\u0646 \u064a\u0643\u0648\u0646 \u0623\u0645\u0631\u064b\u0627 \u0637\u0627\u0631\u0626\u064b\u0627 \u064a\u064f\u0639\u0628\u0651\u0631 \u0639\u0646 \u062d\u0627\u0644\u0629 \u062f\u0627\u062e\u0644\u064a\u0651\u0629 \u0636\u0645\u0646 \u0646\u0638\u0627\u0645 \u0627\u0644\u062a\u0634\u063a\u064a\u0644. \u0628\u0627\u062e\u062a\u0635\u0627\u0631\u060c \u0647\u0646\u0627\u0643 \u0639\u062f\u062f \u0643\u0628\u064a\u0631 \u062c\u062f\u0651\u064b\u0627 \u0645\u0646 \u0627\u0644\u0645\u0635\u0627\u062f\u0631 \u0627\u0644\u0645\u062e\u062a\u0644\u0641\u0629 \u0623\u0648 \u0627\u0644\u0645\u062d\u062a\u0645\u0644\u0629 \u0644\u0644\u0623\u062d\u062f\u0627\u062b. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/academy.hsoub.com\/uploads\/monthly_2016_09\/learn-csharp-events.png.944541095d8f2fec526dc25324105ca1.png\" alt=\"learn-csharp-events.png\"\/><\/p>\n<h2> \t\u0627\u0644\u0639\u0644\u0627\u0642\u0629 \u0628\u064a\u0646 \u0627\u0644\u0623\u062d\u062f\u0627\u062b Events \u0648\u0627\u0644\u0646\u0648\u0651\u0627\u0628 Delegates <\/h2>\n<p> \t\u062a\u0639\u062a\u0645\u062f \u0627\u0644\u0623\u062d\u062f\u0627\u062b \u0628\u0634\u0643\u0644 \u0643\u0644\u064a\u0651 \u0639\u0644\u0649 <a href=\"https:\/\/academy.hsoub.com\/programming\/c-sharp\/%D8%A7%D8%B3%D8%AA%D8%AE%D8%AF%D8%A7%D9%85-%D8%A7%D9%84%D9%86%D9%88%D8%A7%D8%A8-delegates-%D9%81%D9%8A-%D9%84%D8%BA%D8%A9-%D8%B3%D9%8A-%D8%B4%D8%A7%D8%B1%D8%A8-c-r366\/\" rel=\"noreferrer noopener\" target=\"_blank\">\u0627\u0644\u0646\u0648\u0651\u0627\u0628<\/a>. \u0648\u0641\u064a \u0627\u0644\u062d\u0642\u064a\u0642\u0629 \u0647\u064a \u0648\u0633\u064a\u0644\u0629 \u0644\u062a\u0647\u0630\u064a\u0628\u0647\u0627! \u0644\u0646\u0633\u062a\u0639\u064a\u0631 \u0627\u0644\u0635\u0646\u0641 Car \u0645\u0646 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c Lesson13_02 \u0645\u0646 \u0627\u0644\u062f\u0631\u0633 \u0627\u0644\u0633\u0627\u0628\u0642: <\/p>\n<pre> 1\tpublic class Car 2\t{ 3\t\tpublic delegate void SpeedNotificatoinDelegate(string message); 4 5\t\tprivate SpeedNotificatoinDelegate speedNotificationHandler; 6 7\t\tpublic void RegisterWithSpeedNotification(SpeedNotificatoinDelegate handler) 8\t\t{ 9\t\t\tthis.speedNotificationHandler = handler; 10\t\t} 11 12\t\tpublic int CurrentSpeed { get; set; } 13\t\tpublic int MaxSpeed { get; set; } 14 15\t\tpublic Car() 16\t\t{ 17\t\t\tCurrentSpeed = 0; 18\t\t\tMaxSpeed = 100; 19\t\t} 20 21\t\tpublic Car(int maxSpeed, int currentSpeed) 22\t\t{ 23\t\t\tCurrentSpeed = currentSpeed; 24\t\t\tMaxSpeed = maxSpeed; 25\t\t} 26 27\t\tpublic void Accelerate(int delta) 28\t\t{ 29\t\t\tCurrentSpeed += delta; 30 31\t\t\tif (CurrentSpeed > MaxSpeed) 32\t\t\t{ 33\t\t\t\tif(this.speedNotificationHandler != null) 34\t\t\t\t{ 35\t\t\t\t\tstring msg = string.Format(\"You exceed the maximum speed! (Current = {0}, Max = {1})\", 36\t\t\t\t\t\t\t\t\t\t\t\tCurrentSpeed, MaxSpeed); 37 38\t\t\t\t\tspeedNotificationHandler(msg); 39\t\t\t\t} 40\t\t\t} 41\t\t} 42\t}<\/pre>\n<p> \t\u0643\u0646\u062a \u0642\u062f \u0637\u0644\u0628\u062a \u0645\u0646\u0643 \u0641\u064a \u0627\u0644\u062a\u0645\u0631\u064a\u0646 \u0627\u0644\u062f\u0627\u0639\u0645 \u0631\u0642\u0645 2 \u0645\u0646 \u0627\u0644\u062f\u0631\u0633 \u0627\u0644\u0633\u0627\u0628\u0642 \u0623\u0646 \u062a\u062c\u0631\u064a \u062a\u0639\u062f\u064a\u0644\u064b\u0627 \u0639\u0644\u0649 \u0627\u0644\u0635\u0646\u0641 Car \u0628\u062d\u064a\u062b \u062a\u0633\u062a\u063a\u0646\u064a \u0639\u0646 \u0627\u0644\u062a\u0627\u0628\u0639 RegisterWithSpeedNotification\u060c \u0648\u0644\u0645\u0651\u062d\u062a \u0628\u0623\u0646 \u062a\u062c\u0639\u0644 \u0627\u0644\u062d\u0642\u0644 speedNotificationHandler \u0630\u064a \u0645\u062d\u062f\u0651\u062f \u0648\u0635\u0648\u0644 public. \u0628\u0639\u062f \u0625\u062c\u0631\u0627\u0621 \u0647\u0630\u0627 \u0627\u0644\u062a\u0639\u062f\u064a\u0644 \u0633\u064a\u0635\u0628\u062d \u0627\u0644\u0635\u0646\u0641 Car \u0639\u0644\u0649 \u0627\u0644\u0634\u0643\u0644 \u0627\u0644\u062a\u0627\u0644\u064a: <\/p>\n<pre> public class Car { \tpublic delegate void SpeedNotificatoinDelegate(string message);  \tpublic SpeedNotificatoinDelegate speedNotificationHandler;  \tpublic int CurrentSpeed { get; set; }  \tpublic int MaxSpeed { get; set; }  \tpublic Car() \t{ \t\tCurrentSpeed = 0; \t\tMaxSpeed = 100; \t}  \tpublic Car(int maxSpeed, int currentSpeed) \t{ \t\tCurrentSpeed = currentSpeed; \t\tMaxSpeed = maxSpeed; \t}  \tpublic void Accelerate(int delta) \t{ \t\tCurrentSpeed += delta;        \t\tif (CurrentSpeed > MaxSpeed) \t\t{ \t\t\tif (this.speedNotificationHandler != null) \t\t\t{ \t\t\t\tstring msg = string.Format(\"You exceed the maximum speed! (Current = {0}, Max = {1})\", \t\t\t\t\t\t\t\t\t\t\tCurrentSpeed, MaxSpeed);  \t\t\t\tspeedNotificationHandler(msg); \t\t\t} \t\t} \t} }<\/pre>\n<p> \t\u0633\u064a\u0639\u0645\u0644 \u0647\u0630\u0627 \u0627\u0644\u0635\u0646\u0641 \u0628\u0634\u0643\u0644 \u0645\u0645\u062a\u0627\u0632\u060c \u062d\u064a\u062b \u0645\u0646 \u0627\u0644\u0645\u0645\u0643\u0646 \u0623\u0646 \u0646\u064f\u0633\u0646\u062f \u0646\u0627\u0626\u0628\u064b\u0627 \u0644\u0644\u062d\u0642\u0644 speedNotificationHandler \u0645\u0646 \u062e\u0627\u0631\u062c \u0627\u0644\u0635\u0646\u0641 Car \u0628\u0627\u0644\u0634\u0643\u0644 \u0627\u0644\u062a\u0627\u0644\u064a: <\/p>\n<pre> Car car = new Car(100, 0); car.speedNotificationHandler = new Car.SpeedNotificatoinDelegate(OnExceedMaxSpeedHandler);<\/pre>\n<p> \t\u0627\u0644\u0645\u0634\u0643\u0644\u0629 \u0647\u0646\u0627 \u0623\u0646\u0651 \u0627\u0644\u062d\u0642\u0644 speedNotificationHandler \u0623\u0635\u0628\u062d \u0645\u0643\u0634\u0648\u0641\u064b\u0627 \u062a\u0645\u0627\u0645\u064b\u0627\u060c \u062d\u062a\u0649 \u0623\u0646\u0651\u0647 \u0645\u0646 \u0627\u0644\u0645\u0645\u0643\u0646 \u0627\u0633\u062a\u062f\u0639\u0627\u0621 \u0627\u0644\u062a\u0627\u0628\u0639 \u0627\u0644\u0630\u064a \u064a\u063a\u0644\u0651\u0641\u0647 \u0647\u0630\u0627 \u0627\u0644\u0646\u0627\u0626\u0628\u060c \u0645\u0646 \u062e\u0627\u0631\u062c \u0627\u0644\u0635\u0646\u0641 Car\u060c \u0648\u0647\u0630\u0627 \u064a\u0639\u062f\u0651 \u062e\u0631\u0642\u064b\u0627 \u0644\u0645\u0628\u062f\u0623 \u0645\u0647\u0645 \u0641\u064a \u0627\u0644\u0628\u0631\u0645\u062c\u0629 \u0643\u0627\u0626\u0646\u064a\u0651\u0629 \u0627\u0644\u062a\u0648\u062c\u0651\u0647 \u0623\u0644\u0627 \u0648\u0647\u0648 \u0627\u0644\u062a\u063a\u0644\u064a\u0641 Encapsulation. \u0644\u0627 \u064a\u0646\u0628\u063a\u064a \u0623\u0646 \u064a\u062a\u0645\u0643\u0651\u0646 \u0623\u064a\u0651 \u0623\u062d\u062f\u064d \u0645\u0646 \u0627\u0633\u062a\u062f\u0639\u0627\u0621 \u0627\u0644\u062a\u0627\u0628\u0639 \u0627\u0644\u0630\u064a \u064a\u063a\u0644\u0651\u0641\u0647 \u0627\u0644\u062d\u0642\u0644 \u0627\u0644\u0633\u0627\u0628\u0642 \u0625\u0644\u0651\u0627 \u0645\u0646 \u062f\u0627\u062e\u0644 \u0627\u0644\u0635\u0646\u0641 Car \u062d\u0635\u0631\u064b\u0627\u060c \u0644\u0623\u0646\u0651 \u0627\u0644\u0646\u0627\u0626\u0628 \u0627\u0644\u0645\u064f\u0633\u0646\u062f \u0644\u0630\u0644\u0643 \u0627\u0644\u062d\u0642\u0644 \u064a\u064f\u0639\u0628\u0651\u0631 \u0639\u0646 \u062d\u0627\u0644\u0629 \u062f\u0627\u062e\u0644\u064a\u0651\u0629 \u0636\u0645\u0646 \u0627\u0644\u0635\u0646\u0641 Car \u0648\u0647\u064a \u062a\u062c\u0627\u0648\u0632 \u0627\u0644\u0633\u0631\u0639\u0629 \u0627\u0644\u0642\u0635\u0648\u0649. <\/p>\n<p> \t\u062a\u0648\u0641\u0651\u0631 \u0644\u0646\u0627 \u0633\u064a \u0634\u0627\u0631\u0628 \u062d\u0644\u064b\u0627 \u0639\u0645\u0644\u064a\u0651\u064b\u0627 \u0648\u0623\u0646\u064a\u0642\u064b\u0627 \u0644\u0647\u0630\u0647 \u0627\u0644\u0645\u0634\u0643\u0644\u0629 \u062a\u062a\u0645\u062b\u0651\u0644 \u0641\u064a \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0623\u062d\u062f\u0627\u062b. \u0628\u0627\u0644\u0646\u0633\u0628\u0629 \u0644\u0644\u0635\u0646\u0641 Car \u0627\u0644\u0633\u0627\u0628\u0642 (\u0628\u0639\u062f \u0627\u0644\u062a\u0639\u062f\u064a\u0644) \u064a\u0643\u0641\u064a\u0643 \u0623\u0646 \u062a\u064e\u0633\u0650\u0645 \u0627\u0644\u062d\u0642\u0644 speedNotificationHandler \u0628\u0627\u0644\u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u062d\u062c\u0648\u0632\u0629 event \u0644\u064a\u062a\u062d\u0648\u0651\u0644 \u0625\u0644\u0649 \u062d\u062f\u062b \u0644\u0627 \u064a\u0645\u0643\u0646 \u0627\u0633\u062a\u062f\u0639\u0627\u0624\u0647 \u0625\u0644\u0651\u0627 \u0645\u0646 \u062f\u0627\u062e\u0644 \u0627\u0644\u0635\u0646\u0641 Car. \u0644\u0643\u0646 \u0633\u064a\u0643\u0648\u0646 \u0647\u0646\u0627\u0643 \u0627\u062e\u062a\u0644\u0627\u0641 \u0635\u063a\u064a\u0631 \u0641\u064a \u0637\u0631\u064a\u0642\u0629 \u0625\u0633\u0646\u0627\u062f \u0627\u0644\u0646\u0648\u0651\u0627\u0628 \u0625\u0644\u0649 \u0647\u0630\u0627 \u0627\u0644\u062d\u0642\u0644. \u064a\u062d\u062a\u0648\u064a \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c Lesson14_01 \u0639\u0644\u0649 \u0627\u0644\u0646\u0633\u062e\u0629 \u0627\u0644\u062c\u062f\u064a\u062f\u0629 \u0644\u0644\u0635\u0646\u0641 Car \u0645\u0639 \u062a\u0639\u062f\u064a\u0644 \u0628\u0633\u064a\u0637 \u0636\u0645\u0646 \u0627\u0644\u062a\u0627\u0628\u0639 Main \u0644\u0646\u062f\u0639\u0645 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0623\u062d\u062f\u0627\u062b: <\/p>\n<pre> 1\tusing System; 2 3\tnamespace Lesson14_01 4\t{ 5\t    public class Car 6\t    { 7\t        public delegate void SpeedNotificatoinDelegate(string message); 8\t 9\t        public event SpeedNotificatoinDelegate speedNotificationHandler; 10 11\t        public int CurrentSpeed { get; set; } 12\t        public int MaxSpeed { get; set; } 13 14\t        public Car() 15\t        { 16\t            CurrentSpeed = 0; 17\t            MaxSpeed = 100; 18\t        } 19 20\t        public Car(int maxSpeed, int currentSpeed) 21\t        { 22\t            CurrentSpeed = currentSpeed; 23\t            MaxSpeed = maxSpeed; 24\t        } 25 26\t        public void Accelerate(int delta) 27\t        { 28\t            CurrentSpeed += delta; 29\t 30\t            if (CurrentSpeed > MaxSpeed) 31\t            { 32\t                if (this.speedNotificationHandler != null) 33\t                { 34\t                    string msg = string.Format(\"You exceed the maximum speed! (Current = {0}, Max = {1})\", 35\t                        CurrentSpeed, MaxSpeed); 36 37\t                    speedNotificationHandler(msg); 38\t                } 39\t            } 40\t        } 41\t    } 42 43\t    class Program 44\t    { 45\t        static void Main(string[] args) 46\t        { 47\t            Car car = new Car(100, 0); 48 49\t            car.speedNotificationHandler += new Car.SpeedNotificatoinDelegate(OnExceedMaxSpeedHandler); 50\t 51\t            for (int i = 0; i < 5; i++) 52\t            { 53\t                Console.WriteLine(\"Increasing speed by 30\"); 54\t                car.Accelerate(30); 55\t            } 56\t        } 57 58\t        static void OnExceedMaxSpeedHandler(string message) 59\t        { 60\t            Console.WriteLine(message); 61\t        } 62\t    } 63\t}<\/pre>\n<p> \t\u0627\u0646\u0638\u0631 \u0643\u064a\u0641 \u0648\u0636\u0639\u0646\u0627 \u0627\u0644\u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u062d\u062c\u0648\u0632\u0629 event \u0628\u0639\u062f \u0643\u0644\u0645\u0629 public \u0641\u064a \u0627\u0644\u062a\u0635\u0631\u064a\u062d \u0639\u0646 \u0627\u0644\u062d\u0642\u0644 speedNotificationHandler \u0641\u064a \u0627\u0644\u0633\u0637\u0631 9. \u0643\u0645\u0627 \u0623\u0631\u062c\u0648 \u0623\u0646 \u062a\u0644\u0627\u062d\u0638 \u0623\u064a\u0636\u064b\u0627 \u0627\u0644\u062a\u0639\u062f\u064a\u0644 \u0627\u0644\u0630\u064a \u0637\u0631\u0623 \u0641\u064a \u0627\u0644\u0633\u0637\u0631 49 \u0639\u0644\u0649 \u0643\u064a\u0641\u064a\u0651\u0629 \u0625\u0633\u0646\u0627\u062f \u0627\u0644\u0646\u0627\u0626\u0628 \u0627\u0644\u062c\u062f\u064a\u062f \u0625\u0644\u0649 \u0627\u0644\u062d\u0642\u0644 speedNotificationHandler: <\/p>\n<pre> car.speedNotificationHandler += new Car.SpeedNotificatoinDelegate(OnExceedMaxSpeedHandler);<\/pre>\n<p> \t\u0644\u0627\u062d\u0638 \u0643\u064a\u0641 \u0627\u0633\u062a\u062e\u062f\u0645\u0646\u0627 \u0627\u0644\u0639\u0627\u0645\u0644 (=+) \u0628\u062f\u0644\u064b\u0627 \u0645\u0646 \u0627\u0644\u0639\u0627\u0645\u0644 (=). \u0641\u064a \u0627\u0644\u062d\u0642\u064a\u0642\u0629 \u0633\u064a\u0624\u062f\u064a \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0639\u0627\u0645\u0644 (=) \u0641\u064a \u0647\u0630\u0647 \u0627\u0644\u062d\u0627\u0644\u0629 \u0625\u0644\u0649 \u062d\u062f\u0648\u062b \u062e\u0637\u0623 \u0623\u062b\u0646\u0627\u0621 \u062a\u0631\u062c\u0645\u0629 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c. <\/p>\n<p> \t\u0648\u0644\u0643\u0646 \u0645\u0627\u0647\u064a \u0627\u0644\u0641\u0627\u0626\u062f\u0629 \u0645\u0646 \u0627\u0644\u0639\u0627\u0645\u0644 (=+)\u061f \u0644\u0647\u0630\u0627 \u0627\u0644\u0639\u0645\u0644 \u0641\u0627\u0626\u062f\u0629 \u0643\u0628\u064a\u0631\u0629\u060c \u0641\u0645\u0646 \u062e\u0644\u0627\u0644\u0647 \u064a\u0645\u0643\u0646 \u062a\u0633\u062c\u064a\u0644 \u0639\u062f\u0651\u0629 \u0646\u0648\u0651\u0627\u0628 (\u0648\u0628\u0627\u0644\u062a\u0627\u0644\u064a \u0639\u062f\u0651\u0629 \u062a\u0648\u0627\u0628\u0639) \u0636\u0645\u0646 \u0627\u0644\u062d\u062f\u062b speedNotificationHandler \u0628\u0646\u0641\u0633 \u0627\u0644\u0648\u0642\u062a. \u0645\u0645\u0627 \u064a\u0639\u0646\u064a \u0623\u0646\u0651 \u0639\u0628\u0627\u0631\u0629 \u0645\u062b\u0644 \u062a\u0644\u0643 \u0627\u0644\u0645\u0648\u062c\u0648\u062f\u0629 \u0641\u064a \u0627\u0644\u0633\u0637\u0631 37: <\/p>\n<pre> speedNotificationHandler(msg);<\/pre>\n<p> \t\u0633\u062a\u0624\u062f\u0651\u064a \u0625\u0644\u0649 \u0627\u0633\u062a\u062f\u0639\u0627\u0621 \u0623\u064a \u0646\u0627\u0626\u0628 (\u0648\u0628\u0627\u0644\u062a\u0627\u0644\u064a \u0623\u064a \u062a\u0627\u0628\u0639) \u0645\u0633\u062c\u0651\u0644 \u0641\u064a \u0627\u0644\u062d\u062f\u062b speedNotificationHandler \u0628\u0634\u0643\u0644 \u0645\u062a\u0633\u0644\u0633\u0644 \u064a\u0631\u0627\u0639\u064a \u0627\u0644\u062a\u0631\u062a\u064a\u0628 \u0627\u0644\u0630\u064a \u0633\u064f\u062c\u0651\u0644\u062a \u0636\u0645\u0646\u0647 \u0647\u0630\u0647 \u0627\u0644\u0646\u0648\u0651\u0627\u0628 \u0636\u0645\u0646 \u0627\u0644\u062d\u062f\u062b speedNotificationHandler \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0639\u0627\u0645\u0644 =+. \u0646\u0633\u0645\u0651\u064a \u0627\u0644\u062a\u0627\u0628\u0639 OnExceedMaxSpeedHandler \u0627\u0635\u0637\u0644\u0627\u062d\u064b\u0627 \u0628\u0645\u0639\u0627\u0644\u062c \u0627\u0644\u062d\u062f\u062b. <\/p>\n<p> \t\u0627\u0644\u0622\u0646 \u0633\u0646\u0630\u0647\u0628 \u0623\u0628\u0639\u062f \u0645\u0646 \u0630\u0644\u0643 \u0648\u0646\u062c\u0631\u064a \u062a\u063a\u064a\u064a\u0631\u064b\u0627 \u0639\u0644\u0649 \u0639\u0628\u0627\u0631\u0629 \u0627\u0644\u062a\u0633\u062c\u064a\u0644 \u0641\u064a \u0627\u0644\u062d\u062f\u062b \u0641\u064a \u0627\u0644\u0633\u0637\u0631 49 \u0644\u062a\u0635\u0628\u062d \u0639\u0644\u0649 \u0627\u0644\u0634\u0643\u0644 \u0627\u0644\u062a\u0627\u0644\u064a: <\/p>\n<pre> car.speedNotificationHandler += OnExceedMaxSpeedHandler;<\/pre>\n<p> \t\u0644\u0627\u062d\u0638 \u0647\u0646\u0627 \u0623\u0646\u0651\u0646\u0627 \u0642\u062f \u0623\u0632\u0644\u0646\u0627 \u0627\u0644\u062a\u0639\u0628\u064a\u0631 \u0627\u0644\u0630\u064a \u064a\u0646\u0634\u0626 \u0643\u0627\u0626\u0646 \u0645\u0646 \u0627\u0644\u0646\u0627\u0626\u0628 SpeedNotificatoinDelegate\u060c \u0648\u0648\u0636\u0639\u0646\u0627 \u0628\u062f\u0644\u064b\u0627 \u0645\u0646 \u0630\u0644\u0643 \u0627\u0633\u0645 \u0627\u0644\u062a\u0627\u0628\u0639 OnExceedMaxSpeedHandler \u0645\u0628\u0627\u0634\u0631\u0629\u064b \u0628\u0639\u062f \u0627\u0644\u0639\u0627\u0645\u0644 (=+). \u0641\u064a \u0627\u0644\u062d\u0642\u064a\u0642\u0629 \u0625\u0646\u0651 \u0645\u062a\u0631\u062c\u0645 \u0633\u064a \u0634\u0627\u0631\u0628 \u0630\u0643\u064a\u0651 \u0643\u0641\u0627\u064a\u0629 \u0644\u064a\u0639\u0631\u0641 \u0623\u0646\u0651\u0647 \u064a\u0646\u0628\u063a\u064a \u0639\u0644\u064a\u0647 \u0623\u0646 \u064a\u064f\u0646\u0634\u0626 \u0643\u0627\u0626\u0646\u064b\u0627 \u062c\u062f\u064a\u062f\u064b\u0627 \u0645\u0646 \u0627\u0644\u0646\u0627\u0626\u0628 SpeedNotificatoinDelegate \u0628\u0634\u0643\u0644 \u062a\u0644\u0642\u0627\u0626\u064a\u0651 \u064a\u063a\u0644\u0651\u0641 \u0627\u0644\u062a\u0627\u0628\u0639 OnExceedMaxSpeedHandler. \u0625\u0630\u0627 \u0646\u0641\u0651\u0630\u062a \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c \u0633\u062a\u062d\u0635\u0644 \u0639\u0644\u0649 \u0646\u0641\u0633 \u0627\u0644\u062e\u0631\u062c \u0627\u0644\u0645\u062a\u0648\u0642\u0651\u0639. <\/p>\n<p> \t<strong>\u0645\u0644\u0627\u062d\u0638\u0629<\/strong>: \u062a\u062a\u0645\u062a\u0651\u0639 \u0627\u0644\u0646\u0648\u0651\u0627\u0628 \u0623\u064a\u0636\u064b\u0627 \u0628\u0645\u064a\u0651\u0632\u0629 \u0627\u0644\u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u0645\u062a\u0639\u062f\u0651\u062f \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0639\u0627\u0645\u0644 =+. \u0648\u0644\u0643\u0646 \u0647\u0630\u0647 \u0627\u0644\u0645\u064a\u0651\u0632\u0629 \u062a\u064f\u0633\u062a\u062e\u062f\u0645 \u0645\u0639 \u0627\u0644\u0623\u062d\u062f\u0627\u062b \u0628\u0634\u0643\u0644 \u0623\u0643\u0628\u0631. <\/p>\n<h2> \t\u0627\u0644\u062a\u0648\u0627\u0628\u0639 \u0645\u062c\u0647\u0648\u0644\u0629 \u0627\u0644\u0627\u0633\u0645 Anonymous Methods <\/h2>\n<p> \t\u0627\u0644\u062a\u0648\u0627\u0628\u0639 \u0645\u062c\u0647\u0648\u0644\u0629 \u0627\u0644\u0627\u0633\u0645 \u0647\u064a \u0645\u0646 \u0627\u0644\u0645\u0632\u0627\u064a\u0627 \u0627\u0644\u062a\u064a \u062a\u0633\u0645\u062d \u0628\u0627\u062e\u062a\u0635\u0627\u0631 \u0627\u0644\u0634\u064a\u0641\u0631\u0629 \u0625\u0644\u0649 \u062d\u062f\u0651\u064d \u0643\u0628\u064a\u0631. \u0641\u0645\u0646 \u0627\u0633\u0645\u0647\u0627\u060c \u064a\u0638\u0647\u0631 \u0623\u0646\u0651\u064e\u0647 \u0644\u0627 \u064a\u0648\u062c\u062f \u0644\u0645\u062b\u0644 \u0647\u0630\u0647 \u0627\u0644\u062a\u0648\u0627\u0628\u0639 \u0627\u0633\u0645\u060c \u0648\u0625\u0646\u0651\u0645\u0627 \u062c\u0633\u0645 \u0641\u0642\u0637 \u064a\u062d\u0648\u064a \u0627\u0644\u0634\u064a\u0641\u0631\u0629 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u062a\u0646\u0641\u064a\u0630\u0647\u0627. \u0643\u0645\u062b\u0627\u0644 \u0628\u0633\u064a\u0637 \u0639\u0644\u0649 \u0627\u0644\u062a\u0648\u0627\u0628\u0639 \u0645\u062c\u0647\u0648\u0644\u0629 \u0627\u0644\u0627\u0633\u0645 \u0633\u0646\u062c\u0631\u064a \u062a\u0639\u062f\u064a\u0644\u064b\u0627 \u0639\u0644\u0649 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c Lesson14_01 \u0627\u0644\u0633\u0627\u0628\u0642 \u0644\u064a\u0633\u062a\u062e\u062f\u0645 \u062a\u0627\u0628\u0639\u064b\u0627 \u0639\u062f\u064a\u0645 \u0627\u0644\u0627\u0633\u0645 \u0628\u062f\u0644\u064b\u0627 \u0645\u0646 \u0627\u0644\u062a\u0627\u0628\u0639 OnExceedMaxSpeedHandler. \u0633\u064a\u0643\u0648\u0646 \u0647\u0630\u0627 \u0627\u0644\u062a\u0639\u062f\u064a\u0644 \u0641\u064a \u0627\u0644\u0633\u0637\u0631 49 \u0644\u064a\u0635\u0628\u062d \u0639\u0644\u0649 \u0627\u0644\u0634\u0643\u0644 \u0627\u0644\u062a\u0627\u0644\u064a: <\/p>\n<pre> car.speedNotificationHandler += delegate(string message) { \tConsole.WriteLine(message); };<\/pre>\n<p> \t\u0644\u0627\u062d\u0638 \u0647\u0646\u0627 \u0623\u0646\u0651\u0646\u0627 \u0642\u062f \u0627\u0633\u062a\u062e\u062f\u0645\u0646\u0627 \u0627\u0644\u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u062d\u062c\u0648\u0632\u0629 delegate \u0628\u0639\u062f \u0627\u0644\u0639\u0627\u0645\u0644 =+ \u0628\u0639\u062f \u0630\u0644\u0643 \u0627\u0644\u0648\u0633\u0627\u0626\u0637 \u0627\u0644\u062a\u064a \u064a\u0642\u0628\u0644\u0647\u0627 \u0647\u0630\u0627 \u0627\u0644\u062a\u0627\u0628\u0639 \u062b\u0645 \u062c\u0633\u0645 \u0627\u0644\u062a\u0627\u0628\u0639 \u0627\u0644\u0645\u062d\u0627\u0637 \u0628\u0627\u0644\u062d\u0627\u0636\u0646\u0629. \u0627\u0644\u0634\u064a\u0621 \u0627\u0644\u0648\u062d\u064a\u062f \u0627\u0644\u0646\u0627\u0642\u0635 \u0647\u0648 \u0627\u0633\u0645 \u0627\u0644\u062a\u0627\u0628\u0639. \u0645\u0646 \u0627\u0644\u0648\u0627\u0636\u062d \u0623\u0646\u0651 \u062a\u0639\u0631\u064a\u0641 \u0647\u0630\u0627 \u0627\u0644\u062a\u0627\u0628\u0639 \u0639\u062f\u064a\u0645 \u0627\u0644\u0627\u0633\u0645 \u064a\u062c\u0628 \u0623\u0646 \u064a\u062a\u0637\u0627\u0628\u0642 \u0645\u0639 \u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0646\u0627\u0626\u0628 \u0627\u0644\u0630\u064a \u0635\u064f\u0631\u0651\u062d \u0627\u0644\u062d\u062f\u062b speedNotificationHandler \u0628\u0646\u0627\u0621\u064b \u0639\u0644\u064a\u0647. \u0627\u0644\u0622\u0646 \u064a\u0645\u0643\u0646 \u0627\u0644\u062a\u062e\u0644\u0651\u0635 \u0645\u0646 \u0627\u0644\u062a\u0627\u0628\u0639 OnExceedMaxSpeedHandler. \u0627\u0646\u0638\u0631 \u0625\u0644\u0649 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c Lesson14_02 \u0627\u0644\u0643\u0627\u0645\u0644: <\/p>\n<pre> 1\tusing System; 2 3\tnamespace Lesson14_02 4\t{ 5\t    public class Car 6\t    { 7\t        public delegate void SpeedNotificatoinDelegate(string message); 8 9\t        public event SpeedNotificatoinDelegate speedNotificationHandler; 10 11\t        public int CurrentSpeed { get; set; } 12\t        public int MaxSpeed { get; set; } 13 14\t        public Car() 15\t        { 16\t            CurrentSpeed = 0; 17\t            MaxSpeed = 100; 18\t        } 19 20\t        public Car(int maxSpeed, int currentSpeed) 21\t        { 22\t            CurrentSpeed = currentSpeed; 23\t            MaxSpeed = maxSpeed; 24\t        } 25 26\t        public void Accelerate(int delta) 27\t        { 28\t            CurrentSpeed += delta; 29 30\t            if (CurrentSpeed > MaxSpeed) 31\t            { 32\t                if (this.speedNotificationHandler != null) 33\t                { 34\t                    string msg = string.Format(\"You exceed the maximum speed! (Current = {0}, Max = {1})\", 35\t                        CurrentSpeed, MaxSpeed); 36\t 37\t                    speedNotificationHandler(msg); 38\t                } 39\t            } 40\t        } 41\t    } 42 43\t    class Program 44\t    { 45\t        static void Main(string[] args) 46\t        { 47\t            Car car = new Car(100, 0); 48 49\t            car.speedNotificationHandler += delegate(string message) 50\t            { 51\t                Console.WriteLine(message); 52\t            }; 53\t 54\t            for (int i = 0; i < 5; i++) 55\t            { 56\t                Console.WriteLine(\"Increasing speed by 30\"); 57\t                car.Accelerate(30); 58\t            } 59\t        } 60\t    } 61\t}<\/pre>\n<p> \t<strong>\u0645\u0644\u0627\u062d\u0638\u0629<\/strong>: \u064a\u0648\u062c\u062f \u0646\u0627\u0626\u0628 \u062c\u0627\u0647\u0632 \u0645\u0648\u062c\u0648\u062f \u0636\u0645\u0646 \u0645\u0643\u062a\u0628\u0629 FCL \u0627\u0633\u0645\u0647 EventHandler \u0648\u0638\u064a\u0641\u062a\u0647 \u062a\u0648\u0641\u064a\u0631 \u0627\u0644\u062f\u0639\u0645 \u0644\u0644\u0623\u062d\u062f\u0627\u062b \u0627\u0644\u062c\u062f\u064a\u062f\u0629 \u0627\u0644\u062a\u064a \u0646\u0639\u0631\u0651\u0641\u0647\u0627\u060c \u0628\u062d\u064a\u062b \u0644\u0627 \u0646\u0636\u0637\u0651\u0631 \u0625\u0644\u0649 \u0627\u0644\u062a\u0635\u0631\u064a\u062d \u0639\u0646 \u0646\u0627\u0626\u0628 \u062c\u062f\u064a\u062f \u0641\u064a \u0643\u0644\u0651 \u0645\u0631\u0651\u0629 \u0646\u0631\u064a\u062f \u0641\u064a\u0647\u0627 \u0627\u0644\u062a\u0635\u0631\u064a\u062d \u0639\u0646 \u062d\u062f\u062b \u062c\u062f\u064a\u062f. \u064a\u063a\u0644\u0651\u0641 \u0627\u0644\u0646\u0627\u0626\u0628 EventHandler \u0623\u064a \u062a\u0627\u0628\u0639 \u064a\u062a\u0637\u0644\u0651\u0628 \u0648\u0633\u064a\u0637\u064a\u0646 \u0627\u0644\u0623\u0648\u0651\u0644 \u0645\u0646 \u0627\u0644\u0646\u0648\u0639 object \u0648\u0627\u0644\u0630\u064a \u064a\u0645\u062b\u0651\u0644 \u0627\u0644\u0643\u0627\u0626\u0646 \u0627\u0644\u0630\u064a \u0623\u0635\u062f\u0631 \u0627\u0644\u062d\u062f\u062b\u060c \u0648\u0627\u0644\u062b\u0627\u0646\u064a \u0645\u0646 \u0627\u0644\u0646\u0648\u0639 EventArgs \u0648\u0647\u0648 \u0643\u0627\u0626\u0646 \u064a\u062d\u062a\u0648\u064a \u0639\u0644\u0649 \u0628\u0639\u0636 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u0625\u0636\u0627\u0641\u064a\u0651\u0629 \u0639\u0646 \u0627\u0644\u062d\u062f\u062b. <\/p>\n<h2> \t\u062a\u0645\u0627\u0631\u064a\u0646 \u062f\u0627\u0639\u0645\u0629 <\/h2>\n<h3> \t\u062a\u0645\u0631\u064a\u0646 1 <\/h3>\n<p> \t\u0644\u064a\u0643\u0646 \u0644\u062f\u064a\u0646\u0627 \u0627\u0644\u0635\u0646\u0641 \u0627\u0644\u062a\u0627\u0644\u064a: <\/p>\n<pre> class Counter { \tprivate int currentValue = 0;  \tpublic void Increase() \t{ \t\tcurrentValue++; \t}  \tpublic void Decrease() \t{ \t\tcurrentValue--; \t} }<\/pre>\n<p> \t\u0623\u062c\u0631\u0650 \u062a\u0639\u062f\u064a\u0644\u064b\u0627 \u0639\u0644\u0649 \u0647\u0630\u0627 \u0627\u0644\u0635\u0646\u0641 \u0628\u062d\u064a\u062b \u062a\u0635\u0631\u0651\u062d \u0639\u0646 \u0627\u0644\u062d\u062f\u062b Notification \u0627\u0644\u0630\u064a \u064a\u064f\u0641\u0639\u0651\u064e\u0644 \u0639\u0646\u062f\u0645\u0627 \u062a\u0635\u0628\u062d \u0642\u064a\u0645\u0629 \u0627\u0644\u062d\u0642\u0644 currentValue \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062a \u0627\u0644\u0639\u062f\u062f 5 \u0641\u0642\u0637. <\/p>\n<p> \t(<strong>\u062a\u0644\u0645\u064a\u062d<\/strong>: \u0627\u0644\u0623\u0639\u062f\u0627\u062f \u0627\u0644\u0633\u0627\u0644\u0628\u0629 \u0644\u064a\u0633\u062a \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062a 5. \u0648\u0627\u0644\u0639\u062f\u062f 5 \u0647\u0648 \u0645\u0636\u0627\u0639\u0641 \u0644\u0646\u0641\u0633\u0647). <\/p>\n<h3> \t\u062a\u0645\u0631\u064a\u0646 2 <\/h3>\n<p> \t\u0623\u062c\u0631\u0650 \u062a\u0639\u062f\u064a\u0644\u064b\u0627 \u0639\u0644\u0649 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c Lesson14_02 \u0627\u0644\u0633\u0627\u0628\u0642 \u0644\u062a\u0633\u062a\u063a\u0646\u064a \u0639\u0646 \u0627\u0644\u0646\u0627\u0626\u0628 SpeedNotificatoinDelegate \u062a\u0645\u0627\u0645\u064b\u0627\u060c \u0628\u062d\u064a\u062b \u062a\u0633\u062a\u062e\u062f\u0645 \u0627\u0644\u0646\u0627\u0626\u0628 \u0627\u0644\u062c\u0627\u0647\u0632 EventHandler \u0639\u0648\u0636\u064b\u0627 \u0639\u0646\u0647. <\/p>\n<p> \t(<strong>\u062a\u0644\u0645\u064a\u062d<\/strong>: \u0633\u064a\u062a\u0637\u0644\u0651\u0628 \u0627\u0644\u0623\u0645\u0631 \u062a\u0639\u062f\u064a\u0644 \u0627\u0644\u0648\u0633\u0627\u0626\u0637 \u0627\u0644\u0645\u0645\u0631\u0651\u0631\u0629 \u0625\u0644\u0649 \u0645\u0639\u0627\u0644\u062c \u0627\u0644\u062d\u062f\u062b \u0644\u062a\u062a\u0637\u0627\u0628\u0642 \u0645\u0639 \u0627\u0644\u0648\u0633\u0627\u0626\u0637 \u0627\u0644\u062a\u064a \u064a\u062d\u062a\u0627\u062c\u0647\u0627 \u0627\u0644\u0646\u0627\u0626\u0628 EventHandler) <\/p>\n<h2> \t\u0627\u0644\u062e\u0644\u0627\u0635\u0629 <\/h2>\n<p> \t\u062a\u0639\u0631\u0651\u0641\u0646\u0627 \u0641\u064a \u0647\u0630\u0627 \u0627\u0644\u062f\u0631\u0633 \u0639\u0644\u0649 \u0627\u0644\u0623\u062d\u062f\u0627\u062b Events. \u062a\u0644\u0643 \u0627\u0644\u062a\u0642\u0646\u064a\u0651\u0629 \u0627\u0644\u0645\u0647\u0645\u0651\u0629 \u0627\u0644\u062a\u064a \u062a\u0639\u062a\u0645\u062f \u0639\u0644\u064a\u0647\u0627 \u062a\u0637\u0628\u064a\u0642\u0627\u062a \u0633\u0637\u062d \u0627\u0644\u0645\u0643\u062a\u0628 desktop applications \u0628\u0634\u0643\u0644 \u0623\u0633\u0627\u0633\u064a\u0651\u060c \u0641\u0636\u0644\u064b\u0627 \u0639\u0646 \u0628\u0627\u0642\u064a \u0623\u0646\u0648\u0627\u0639 \u0627\u0644\u062a\u0637\u0628\u064a\u0642\u0627\u062a \u0645\u062b\u0644 \u062a\u0637\u0628\u064a\u0642\u0627\u062a \u0627\u0644\u0648\u064a\u0628\u060c \u0648\u062a\u0637\u0628\u064a\u0642\u0627\u062a \u0627\u0644\u0623\u062c\u0647\u0632\u0629 \u0627\u0644\u0645\u062d\u0645\u0648\u0644\u0629\u060c \u0648\u0623\u064a \u0646\u0648\u0639 \u0645\u0646 \u0623\u0646\u0648\u0627\u0639 \u0627\u0644\u062a\u0637\u0628\u064a\u0642\u0627\u062a \u0627\u0644\u062a\u064a \u062a\u062a\u0637\u0644\u0651\u0628 \u0627\u0644\u062a\u0641\u0627\u0639\u0644 \u0627\u0644\u062f\u0627\u062e\u0644\u064a \u0645\u0639 \u0646\u0638\u0627\u0645 \u0627\u0644\u062a\u0634\u063a\u064a\u0644 \u0623\u0648 \u0627\u0644\u062e\u0627\u0631\u062c\u064a\u0651 \u0645\u0639 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0639\u0646\u062f\u0645\u0627 \u062a\u0639\u0645\u0644 \u0639\u0644\u0649 \u062d\u0627\u0633\u0648\u0628\u0643 \u0627\u0644\u0634\u062e\u0635\u064a\u060c \u0623\u0648 \u062d\u062a\u0649 \u0639\u0644\u0649 \u0647\u0627\u062a\u0641\u0643 \u0627\u0644\u0630\u0643\u064a\u0651\u060c \u0623\u0648 \u0631\u0628\u0651\u0645\u0627 \u0633\u0627\u0639\u062a\u0643 \u0627\u0644\u0630\u0643\u064a\u0651\u0629. \u0641\u0623\u0646\u062a \u062a\u0633\u062a\u062e\u062f\u0645 \u0627\u0644\u0623\u062d\u062f\u0627\u062b \u0622\u0644\u0627\u0641 \u0627\u0644\u0645\u0631\u0651\u0627\u062a. \u0627\u0644\u062d\u062f\u062b \u0647\u0648 \u0648\u0633\u064a\u0644\u0629 \u062c\u0645\u064a\u0644\u0629 \u0644\u0644\u062a\u0639\u0628\u064a\u0631 \u0639\u0646 \u0623\u0645\u0631 \u0637\u0627\u0631\u0626 \u062d\u062f\u062b \u0644\u0643\u0627\u0626\u0646 \u0628\u0631\u0645\u062c\u064a\u0651. \u0642\u062f \u064a\u0643\u0648\u0646 \u0647\u0630\u0627 \u0627\u0644\u0623\u0645\u0631 \u0627\u0644\u0637\u0627\u0631\u0626 \u0639\u0628\u0627\u0631\u0629 \u0639\u0646 \u0646\u0642\u0631\u0629 \u0632\u0631 \u0641\u0623\u0631\u0629\u060c \u0623\u0648 \u0639\u0646 \u0644\u0645\u0633\u0629 \u0639\u0644\u0649 \u0634\u0627\u0634\u0629 \u062c\u0647\u0627\u0632\u0643 \u0627\u0644\u0630\u0643\u064a. \u0623\u0648 \u0636\u063a\u0637\u0629 \u0645\u0641\u062a\u0627\u062d \u0645\u0646 \u0644\u0648\u062d\u0629 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d \u0627\u0644\u062e\u0627\u0635\u0651\u0629 \u0628\u064a \u0648\u0623\u0646\u0627 \u0623\u0643\u062a\u0628 \u0647\u0630\u0627 \u0627\u0644\u0645\u0642\u0627\u0644\u060c \u0623\u0648 \u0623\u0646 \u064a\u0643\u0648\u0646 \u0623\u0645\u0631\u064b\u0627 \u0637\u0627\u0631\u0626\u064b\u0627 \u064a\u064f\u0639\u0628\u0651\u0631 \u0639\u0646 \u062d\u0627\u0644\u0629 \u062f\u0627\u062e\u0644\u064a\u0651\u0629 \u0636\u0645\u0646 \u0646\u0638\u0627\u0645 \u0627\u0644\u062a\u0634\u063a\u064a\u0644. \u0628\u0627\u062e\u062a\u0635\u0627\u0631\u060c \u0647\u0646\u0627\u0643 \u0639\u062f\u062f \u0643\u0628\u064a\u0631 \u062c\u062f\u0651\u064b\u0627 \u0645\u0646 \u0627\u0644\u0645\u0635\u0627\u062f\u0631 \u0627\u0644\u0645\u062e\u062a\u0644\u0641\u0629 \u0623\u0648 \u0627\u0644\u0645\u062d\u062a\u0645\u0644\u0629 \u0644\u0644\u0623\u062d\u062f\u0627\u062b. <\/p>\n<p> \t\u0627\u0644\u0639\u0644\u0627\u0642\u0629 \u0628\u064a\u0646 \u0627\u0644\u0623\u062d\u062f\u0627\u062b Events \u0648\u0627\u0644\u0646\u0648\u0651\u0627\u0628 Delegates \t\u062a\u0639\u062a\u0645\u062f \u0627\u0644\u0623\u062d\u062f\u0627\u062b \u0628\u0634\u0643\u0644 \u0643\u0644\u064a\u0651 \u0639\u0644\u0649 \u0627\u0644\u0646\u0648\u0651\u0627\u0628. \u0648\u0641\u064a \u0627\u0644\u062d\u0642\u064a\u0642\u0629 \u0647\u064a \u0648\u0633\u064a\u0644\u0629 \u0644\u062a\u0647\u0630\u064a\u0628\u0647\u0627! \u0644\u0646\u0633\u062a\u0639\u064a\u0631 \u0627\u0644\u0635\u0646\u0641 Car \u0645\u0646 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c Lesson13_02 \u0645\u0646 \u0627\u0644\u062f\u0631\u0633 \u0627\u0644\u0633\u0627\u0628\u0642:<br \/>\n 1\tpublic class Car 2\t{ 3\t\tpublic delegate void SpeedNotificatoinDelegate(string message); 4 5\t\tprivate SpeedNotificatoinDelegate speedNotificationHandler; 6 7\t\tpublic void RegisterWithSpeedNotification(SpeedNotificatoinDelegate handler) 8\t\t{ 9\t\t\tthis.speedNotificationHandler = handler; 10\t\t} 11 12\t\tpublic int CurrentSpeed { get; set; } 13\t\tpublic int MaxSpeed { get;..<\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,95],"tags":[],"class_list":["post-1262","post","type-post","status-publish","format-standard","hentry","category-library","category-int-posts"],"_links":{"self":[{"href":"https:\/\/developers.sd\/index.php?rest_route=\/wp\/v2\/posts\/1262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.sd\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developers.sd\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developers.sd\/index.php?rest_route=\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/developers.sd\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1262"}],"version-history":[{"count":2,"href":"https:\/\/developers.sd\/index.php?rest_route=\/wp\/v2\/posts\/1262\/revisions"}],"predecessor-version":[{"id":1374,"href":"https:\/\/developers.sd\/index.php?rest_route=\/wp\/v2\/posts\/1262\/revisions\/1374"}],"wp:attachment":[{"href":"https:\/\/developers.sd\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developers.sd\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers.sd\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}