TAILIEUCHUNG - C Language Reference Manual_10

Phần lớn các ngôn ngữ C # cho phép lập trình để xác định thông tin khai báo về các đối tượng quy định tại chương trình. Ví dụ, khả năng tiếp cận của một phương pháp trong một lớp học được quy định cụ thể trang trí nó với công chúng phương pháp bổ, bảo vệ, nội bộ, và tư nhân | Chapter 16 Exceptions 16. Exceptions Copyright Microsoft Corporation 1999-2000. All Rights Reserved. 249 Chapter 17 Attributes 17. Attributes Much of the C language enables the programmer to specify declarative information about the entities defined in the program. For example the accessibility of a method in a class is specified by decorating it with the method-modifiers public protected internal and private. C enables programmers to invent new kinds of declarative information to specify declarative information for various program entities and to retrieve attribute information in a run-time environment. For instance a framework might define a HelpAttribute attribute that can be placed on program elements such as classes and methods to provide a mapping from program elements to documentation for them. New kinds of declarative information are defined through the declaration of attribute classes which may have positional and named parameters . Declarative information is specified a C program using attributes and can be retrieved at run-time as attribute instances . Attribute classes The declaration of an attribute class defines a new kind of attribute that can be placed on a declaration. A class that derives from the abstract class whether directly or indirectly is an attribute class. A declaration of an attribute class is subject to the following additional restrictions A non-abstract attribute class must have public accessibility. All of the types in which a non-abstract attribute class is nested must have public accessibility. A non-abstract attribute class must have at least one public constructor. Each of the formal parameter types for each of the public constructors of an attribute class must be an attribute parameter type . By convention attribute classes are named with a suffix of Attribute. Uses of an attribute may either include or omit this suffix. The AttributeUsage attribute The AttributeUsage .

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.