TAILIEUCHUNG - microsoft visual c 2008 step by step phần 6

Các tên phương thức được mở đầu bằng tên của giao diện. Điều này được biết đến như thực hiện giao diện rõ ràng và là một thói quen tốt để tu luyện. Tất cả các phương pháp thực hiện một giao diện phải được công khai. Tuy nhiên, nếu bạn đang sử dụng thực hiện giao diện rõ ràng, phương pháp không nên có một vòng loại truy cập. | Chapter 16 Using Indexers 309 Implement an interface indexer in a class or structure In the class or structure that implements the interface define the indexer and implement the accessors. For example struct RawInt IRawInt public bool this int index get set Implement an interface indexer by using explicit interface implementation in a class or structure In the class or structure that implements the interface explicitly name the interface but do not specify the indexer accessibility. For example struct RawInt IRawInt bool IRawInt this int index get set Chapter 17 Interrupting Program Flow and Handling Events After completing this chapter you will be able to Declare a delegate type to create an abstraction of a method signature. Create an instance of a delegate to refer to a specific method. Call a method through a delegate. Define a lambda expression to specify the code for a delegate. Declare an event field. Handle an event by using a delegate. Raise an event. Much of the code you have written in the various exercises in this book has assumed that statements execute sequentially. Although this is a common scenario you will find that it is sometimes necessary to interrupt the current flow of execution and perform another more important task. When the task has completed the program can continue where it left off. The classic example of this style of program is the Microsoft Windows Presentation Foundation WPF form. A WPF form displays controls such as buttons and text boxes. When you click a button or type text in a text box you expect the form to respond immediately. The application has to temporarily stop what it is doing and handle your input. This style of operation applies not just to graphical user interfaces but to any application where an operation must be performed urgently-shutting down the reactor in a nuclear power plant if it is getting too hot for example. To handle this type of application the runtime has to provide two things a means of indicating .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.