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
Giới thiệu
Đăng ký
Đăng nhập
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
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
microsoft visual c 2008 step by step phần 5
Đang chuẩn bị liên kết để tải về tài liệu:
microsoft visual c 2008 step by step phần 5
Gia Bạch
71
67
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Khi bạn thực hiện một giao diện, bạn phải đảm bảo rằng mỗi phương pháp phù hợp với phương pháp giao diện tương ứng của nó một cách chính xác, theo quy tắc sau đây: tên phương pháp và các loại trả lại phù hợp với chính xác. Bất kỳ các thông số (bao gồm cả ref và bổ từ khóa trong) phù hợp với chính xác. | 242 Part II Understanding the C Language When you implement an interface you must ensure that each method matches its corresponding interface method exactly according to the following rules The method names and return types match exactly. Any parameters including ref and out keyword modifiers match exactly. The method name is prefaced by the name of the interface. This is known as explicit interface implementation and is a good habit to cultivate. All methods implementing an interface must be publicly accessible. However if you are using explicit interface implementation the method should not have an access qualifier. If there is any difference between the interface definition and its declared implementation the class will not compile. The Advantages of Explicit Interface Implementations Implementing an interface explicitly can seem a little verbose but it does offer a number of advantages that help you to write clearer more maintainable and more predictable code. You can implement a method without explicitly specifying the interface name but this can lead to some differences in the way the implementation behaves. Some of these differences can cause confusion. For example a method defined by using explicit interface implementation cannot be declared as virtual whereas omitting the interface name allows this behavior. It s possible for multiple interfaces to contain methods with the same names return types and parameters. If a class implements multiple interfaces with methods that have common signatures you can use explicit interface implementation to disambiguate the method implementations. Explicit interface implementation identifies which methods in a class belong to which interface. Additionally the methods for each interface are publicly accessible but only through the interface itself. We will look at how to do this in the upcoming section Referencing a Class Through Its Interface. In this book I recommend implementing an interface explicitly wherever .
TÀI LIỆU LIÊN QUAN
Microsoft Visual C# 2008
Giáo Trình Visual studio 2008
Programming Visual Basic 2008
Beginning Microsoft Visual C# 2008 PHẦN 1
Beginning Microsoft Visual C# 2008 PHẦN 2
Beginning Microsoft Visual C# 2008 PHẦN 3
Beginning Microsoft Visual C# 2008 PHẦN 4
Beginning Microsoft Visual C# 2008 PHẦN 5
Beginning Microsoft Visual C# 2008 PHẦN 6
Beginning Microsoft Visual C# 2008 PHẦN 7
crossorigin="anonymous">
Đã 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.