Praise for C# 2.0: Practical Guide for Programmers 2005 phần 10

Tham khảo tài liệu 'praise for c# : practical guide for programmers 2005 phần 10', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Attributes 215 public static void Main FORMAT n Type Abstract Class Interface Primitive Public Sealed ValueType GetTypeInfo GetTypeInfo GetTypeInfo MyInterface GetTypeInfo MyAbstractClass GetTypeInfo MyBaseClass GetTypeInfo MyDerivedClass GetTypeInfo MyStruct Output Type Abstract Class Interface Primitive Public Sealed ValueType False False False True True True True True True False False True False False MyInterface True False True False False False False MyAbstractClass True True False False False False False MyBaseClass False True False False True False False MyDerivedClass False True False False False True False MyStruct False False False False False True True Attributes An attribute is an annotation that can be applied to global targets including assemblies or .NET modules as well as other targets including classes methods fields parameters properties return types and events. It is a way to extend the metadata stored in an assembly or module with user-defined custom metadata. Each attribute therefore tells the compiler to gather metadata about a particular target at compile-time. This metadata can be later retrieved at runtime by an application via reflection. An attribute specifies an optional global target either an executable assembly or a .NET module followed by optional input arguments all within square brackets. The EBNF definition is given here I EBNF I Attributes AttributeSections . AttributeSection AttributeTargetSpecifier AttributeList . AttributeTargetSpecifier AttributeTarget . Attribute AttributeName AttributeArguments . 216 Chapter 10 Reflection and Attributes AttributeArguments PositionalArgumentList PositionalArgumentList NamedArgumentList NamedArgumentList . Each attribute is implicitly defined by a class that inherits from the abstract class Attribute under the System namespace. The suffix Attribute is typically added by convention to all derived .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
28    90    2    06-06-2024
Đã 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.