Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Tài liệu HOT
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Delegates and Events
TAILIEUCHUNG - Delegates and Events
Classes are reference types that allow you to create instances of objects and use them in special ways to meet your application’s requirement. Another reference type in C# is delegate. Delegates allow you to change the reference to a method at runtime. This means that you can decide the execution of a method at run-time, based on the requirements of your application. The method can be activated at the occurrence of an event, where an event is associated with the delegate to call the method at run-time. . | Delegates and Events Chapter 12 Classes are reference types that allow you to create instances of objects and use them in special ways to meet your application s requirement. Another reference type in C is delegate. Delegates allow you to change the reference to a method at runtime. This means that you can decide the execution of a method at run-time based on the requirements of your application. The method can be activated at the occurrence of an event where an event is associated with the delegate to call the method at run-time. This chapter discusses the creation of delegates. This chapter also discusses how to implement multicast delegates. In addition it discusses how you can use events with delegates. Objectives In this chapter you will learn to fl Implement delegates fl Implement multicast delegates fl Use events with delegates Introducing Delegates Delegates in C allow you to dynamically change the reference to the methods in a class. Consider an example of a coffee vending machine which dispenses different flavors of coffee such as cappuccino and black coffee. On selecting the desired flavor of coffee the vending machine decides to dispense the ingredients such as milk powder coffee powder hot water cappuccino coffee powder. All the materials are placed in different containers inside the vending machine. The required material is dispensed when you select a flavor. Suppose you select black coffee the vending machine will call methods to dispense hot water and coffee powder only. The reference to these methods is made dynamically when you press the required button to dispense black coffee. A delegate is a reference type variable which holds the reference to a method. This reference can be changed at runtime as desired. Although delegates are a general-purpose mechanism for indirectly calling methods at runtime their primary use in C programming is for implementing events and the call-back methods. To implement delegates in your application you need to .
Xuân Quý
54
22
pdf
Báo lỗi
Trùng lắp nội dung
Văn hóa đồi trụy
Phản động
Bản quyền
File lỗi
Khác
Upload
Tải xuống
đang nạp các trang xem trước
Không thể tạo bản xem trước, hãy bấm tải xuống
Tải xuống
TÀI LIỆU LIÊN QUAN
Giáo trình niit quarter 2 virsion 2 rdd - chương 2
42
39
0
Giáo trình niit quarter 2 virsion 2 rdd - chương 1
36
46
0
Giáo trình Exception Handling
20
45
0
Giáo trình EXPERIMENT
14
42
0
Inheritance
28
43
0
File Input and Output
22
54
0
Introduction to the Object-Oriented Approach
24
49
0
Creating Multithreaded Applications
38
55
0
Creating Objects
18
53
0
Delegates and Events
22
48
0
TÀI LIỆU XEM NHIỀU
Một Case Về Hematology (1)
8
461861
55
Giới thiệu :Lập trình mã nguồn mở
14
22625
59
Tiểu luận: Tư tưởng Hồ Chí Minh về xây dựng nhà nước trong sạch vững mạnh
13
10883
529
Câu hỏi và đáp án bài tập tình huống Quản trị học
14
10061
446
Phân tích và làm rõ ý kiến sau: “Bài thơ Tự tình II vừa nói lên bi kịch duyên phận vừa cho thấy khát vọng sống, khát vọng hạnh phúc của Hồ Xuân Hương”
3
9517
104
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8278
1125
Tiểu luận: Nội dung tư tưởng Hồ Chí Minh về đạo đức
16
8227
423
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7863
2220
Đề tài: Dự án kinh doanh thời trang quần áo nữ
17
6672
253
Vật lý hạt cơ bản (1)
29
5768
85
TỪ KHÓA LIÊN QUAN
Kỹ thuật lập trình
Giáo trình NIIT Quarter 2
C Sharp
ngôn ngữ C
tài liệu C
lập trình với C
ngôn ngữ SQL
tài liệu SQL
cơ sở dữ liệu SQL
SQL Server
TÀI LIỆU MỚI ĐĂNG
Giáo án mầm non chương trình đổi mới: Gia đình vui nhộn
4
312
1
25-04-2024
Bơm máy nén quạt trong công nghệ part 1
20
249
2
25-04-2024
Management and Services Part 1
10
156
0
25-04-2024
MySQL Database Usage & Administration PHẦN 9
37
141
0
25-04-2024
MÔN HỌC VẬT LIỆU VÀ CÔNG NGHỆ KIM LOẠI - PHẦN I: KIM LOẠI HỌC
32
175
2
25-04-2024
B2B Content Marketing: 2012 Benchmarks, Budgets & Trends
17
138
0
25-04-2024
Giáo trình CẤU TRÚC DỮ LIỆU VÀ GIẢI THUẬT - Chương 1
5
125
0
25-04-2024
QUẢN LÝ CHẤT LƯỢNG KHÔNG KHÍ
75
137
0
25-04-2024
New Trends and Developments in Automotive Industry Part 7
35
95
0
25-04-2024
Bài Tiểu Luận Chuyên Đề Tổ Chức Hoạt Động Nhận Thức Trong Dạy Học Vật Lý " Định Luật Ôm Cho Các Loại Đoạn Mạch Chứa Nguồn Điện"
10
150
3
25-04-2024
TÀI LIỆU HOT
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7863
2220
Giáo trình Tư tưởng Hồ Chí Minh - Mạch Quang Thắng (Dành cho bậc ĐH - Không chuyên ngành Lý luận chính trị)
152
5714
1363
Ebook Chào con ba mẹ đã sẵn sàng
112
3766
1231
Ebook Tuyển tập đề bài và bài văn nghị luận xã hội: Phần 1
62
5316
1136
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8278
1125
Giáo trình Văn hóa kinh doanh - PGS.TS. Dương Thị Liễu
561
3495
643
Tiểu luận: Tư tưởng Hồ Chí Minh về xây dựng nhà nước trong sạch vững mạnh
13
10883
529
Giáo trình Sinh lí học trẻ em: Phần 1 - TS Lê Thanh Vân
122
3681
525
Giáo trình Pháp luật đại cương: Phần 1 - NXB ĐH Sư Phạm
274
4043
514
Bài tập nhóm quản lý dự án: Dự án xây dựng quán cafe
35
4124
480
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.