当前位置:网站首页>C Advanced (feature)
C Advanced (feature)
2022-06-10 06:38:00 【Don't ask, ask is a program ape】
characteristic
What are features
| describe C# Information about some types of data in |
The role of characteristics
| Used to apply metadata or declaration information to code ( Assembly 、 type 、 Method 、 Properties, etc ) Related to |
Characterization
| Features can be like adding metadata to a program ( Variable ) | |
| You can apply one or more features to the entire assembly 、 Modules or smaller program elements ( Such as classes and properties ) | A program element can add multiple features |
| Properties can accept parameters in the same way as methods and properties | Features can accept parameters |
| Programs can use reflection to check their own metadata or metadata within other programs | |
| characteristic ( Metadata ) It is defined after compilation | |
Metadata
| Metadata (Meta Data) | Metadata is a kind of binary information , For storing portable executable files in common language runtime (PE) File or program stored in memory . Compile your code into PE When you file , The metadata will be inserted into a part of the file , And convert the code to Microsoft Interlingua (MSIL) And insert it into another part of the file . Each type and member defined and referenced in a module or assembly is described in metadata . When executing code , The runtime loads metadata into memory , And reference it to find classes about the code 、 member 、 Inheritance and other information . |
Characteristic classification
Predefined feature (.NET)
AttributeUsage
| AttributeUsage | Predefined feature AttributeUsage It is mainly used to identify the types of program elements to which custom features can be applied , This information is given by the first parameter . |
[AttributeUsage( validon,// Specify the language elements where features can be placed , It's an enumerator AttributeTargets A combination of the values of , The default is AttributeTargets.All. AllowMultiple=allowmultiple,// If true, This feature can be used multiple times in the same element , The default is false( Can not be used more than once ). Inherited=inherited,// If true, The property can be inherited by a derived class , The default value is false( Don't be inherited ) )] | |
|
Conditional
| Conditional | This predefined feature marks a conditional method , Its execution depends on its top preprocessing identifier . It causes conditional compilation of method calls , Depends on the specified value , such as Debug and Trace |
|
Obsolete
| Obsolete | This predefined feature marks program entities that should not be used . It lets you tell the editor to discard a specific target element . for example , When a new method is used in a class , But you still want to keep the old methods in the class , You can display a new method that you should use by prompting , Not the old method message , Let's label it as obsolete( Out of date ). |
|
Custom features
| Custom attributes should be derived from System,Attribute class | |
| ||
Unity Provide us with custom features | Header System.Serializable Range ... | |
边栏推荐
- Jumping game II
- Efficiency improvement: realize personal task management and monitoring with notation
- CMD of Jerry's AI protocol_ SET_ BLE_ Format of visibility command [chapter]
- Method of canceling automatic numbering
- Leetcode game 79 biweekly - complete all questions
- Wonderful adventures of MySQL
- 虚拟机网络连接方式
- SQL practice: SQL foundation and execution sequence
- Oriental Star Hotel Management Catering project - query function
- Marketing strategy and supply forecast report of China's rice industry from 2022 to 2027 (New Edition)
猜你喜欢

Wechat team sharing: how the wechat background does not crash under massive concurrent requests

Virtual machine network connection mode

在 Kubernetes 中基于 StatefulSet 部署 MySQL(下)

白加黑过360启动项工具源码发布 多文件过启动项代码

QT上位机 通过EGM实时控制ABB

深度解析智能运维下告警关联频繁项集挖掘算法原理

jacoco精确到行整理

openGauss 数据库 ODBC 环境连接配置 (Windows)

The third part of urban informatics - Intelligent geography can realize personalized and sustainable urban transportation in the future

Nextcloud internal server error the server cannot complete your request workaround
随机推荐
刘勇智:一码通缺陷分析与架构设计方案丨声网开发者创业讲堂 Vol.02
OSPF route summary experiment
火狐浏览器设置指向代理模式
Firefox browser settings point to proxy mode
将一个按钮固定在右下角
tensorflow实验九----------泰坦尼克号
Machine learning notes - Interpretation of transformer/attention papers
How to extract some specific text in excel?
CMD of Jerry's AI protocol_ SET_ BLE_ Visibility [chapter]
Liuyongzhi: one code communication defect analysis and architecture design scheme - sound network developer entrepreneurship lecture VOL.02
SQL practice: SQL window functions and real problems
Model learning comprehension in Multi-Agent Reinforcement Learning Based on Model
What is the 8b/10b code?
Saccadenet: use corner features to fine tune the two stage prediction frame | CVPR 2020
将json文件里面的数据写入数据库
CMD of Jerry's AI protocol_ SET_ BLE_ Format of visibility command [chapter]
Statement that I am not a grey hat
Proteus仿真p时出现Cannot open‘***\LISA5476.SDF’的错误
Principe de l'algorithme d'extraction de l'ensemble d'éléments fréquents associés à l'alarme dans le cadre de l'exploitation et de l'entretien intelligents
Determine whether the process has administrator privileges



