构建代码 1,程序集(Assembly) 2,模块(Module) 3,类型(Type) 4,DynamicMethod 定义方法与添加 IL [......] 继续阅读

2020年6月11日 0条评论 3215点热度 2人点赞 痴者工良 阅读全文

Building Code 1. Assembly 2. Module 3. Type 4. DynamicMethod Defining Methods and Adding IL Previously, this series has written a total of nine ar[......] 继续阅读

2020年6月11日 0条评论 80点热度 2人点赞 痴者工良 阅读全文

1,InvokeMember 1.1 InvokeMember 参数 1.1.1 name 1.1.2 invokeAttr 1.1.3 binder 1.1.4 target 1.1.5 args 1.1.6 返回 1.1.7 BindingFlags 1.1.8 根据是否公开 1.1.9 大小[......] 继续阅读

2020年1月18日 1条评论 3297点热度 0人点赞 痴者工良 阅读全文

1. InvokeMember 1.1 InvokeMember Parameters 1.1.1 name 1.1.2 invokeAttr 1.1.3 binder 1.1.4 target 1.1.5 args 1.1.6 Return 1.1.7 BindingFlags 1.1.8[......] 继续阅读

2020年1月18日 1条评论 66点热度 0人点赞 痴者工良 阅读全文

1,属性字段的赋值和读值 2,自定义特性和特性查找 2.1 特性规范和自定义特性 2.1.1 定义特性 2.1.2 限制特性的使用 2.1.3 特性的构造函数和属性 2.2 检索特性 2.2.1 方式一 2.2.2 方式二 3,设计一个数据验证工具 3.1 定义抽象验证特性类 3.2 实现多个[......] 继续阅读

2020年1月12日 2条评论 4502点热度 0人点赞 痴者工良 阅读全文

1. Assignment and Reading of Property Fields 2. Custom Attributes and Attribute Lookup 2.1 Specifications and Custom Attributes 2.1.1 Defining Attr[......] 继续阅读

2020年1月12日 2条评论 4490点热度 0人点赞 痴者工良 阅读全文

1,MemberInfo 1.1 练习-获取类型的成员以及输出信息 1.2 MemberType 枚举 1.3 MemberInfo 获取成员方法并且调用 1.4 获取继承中方法的信息(DeclaringType 和 ReflectedType) 2,从 IL 看反射 2.1 获取属性的构造 2.[......] 继续阅读

2020年1月11日 1条评论 3249点热度 0人点赞 痴者工良 阅读全文

1. MemberInfo 1.1 Exercise - Get Type Members and Output Information 1.2 MemberType Enumeration 1.3 MemberInfo Get Member Method and Call 1.4 Get In[......] 继续阅读

2020年1月11日 1条评论 3269点热度 0人点赞 痴者工良 阅读全文

1,实例化类型 1.1 Activator.CreateInstance() 1.1.1 简单类型 1.1.2 简单类型的构造函数 1.1.3 object 1.1.4 故意出错 1.1.5 Activator.CreateInstance() 性能 1.2 ConstructorInfo.Inv[......] 继续阅读

2020年1月5日 0条评论 3309点热度 0人点赞 痴者工良 阅读全文

1. Instantiating Types 1.1 Activator.CreateInstance() 1.1.1 Simple Types 1.1.2 Constructors of Simple Types 1.1.3 object 1.1.4 Intentional Error 1.[......] 继续阅读

2020年1月5日 0条评论 110点热度 0人点赞 痴者工良 阅读全文

1,获取类型的信息 1.1 类型的基类和接口 1.1.1 基类 1.1.2 获取实现的接口 1.1.3 获取泛型接口 1.2 获取属性、字段成员 1.2.1 构造函数 1.2.2 属性 1.2.3 字段 1.2.4 方法 1.2.5 事件 1.2.6 成员 [......] 继续阅读

2020年1月5日 0条评论 3056点热度 1人点赞 痴者工良 阅读全文

1. Getting Type Information 1.1 Base Classes and Interfaces of Types 1.1.1 Base Class 1.1.2 Getting Implemented Interfaces 1.1.3 Getting Generic In[......] 继续阅读

2020年1月5日 0条评论 106点热度 1人点赞 痴者工良 阅读全文

1. Overview of Reflection Usage 1.1 What is Reflection 1.2 What can Reflection do 1.3 Type Class 1.4 Categories of Reflection Usage 1.4 Type Some Co[......] 继续阅读

2020年1月5日 5条评论 3748点热度 1人点赞 痴者工良 阅读全文

1,反射的使用概述 1.1 什么是反射 1.2 反射可以做什么 1.3 Type 类 1.4 反射使用归类 1.4 Type 一些常用属性 2,获取 Type 2.1 获取 Type 类型 2.2 数组 Type 生成数组 Type 获取数组 Type 获取数组的元素类型、维数 矩形数组(交错数组[......] 继续阅读

2020年1月5日 5条评论 3750点热度 1人点赞 痴者工良 阅读全文

1. Introduction 1.1 About Reflection and Attributes 2. Assembly Operations 2.1 Getting the Assembly Object 2.1.1 Runtime Getting Assemblies 2.1.2[......] 继续阅读

2019年12月29日 2条评论 72点热度 0人点赞 痴者工良 阅读全文

1. 说明 1.1 关于反射、特性 2. 程序集操作 2.1 获取 程序集对象(Assembly) 2.1.1 运行时获取程序集 2.1.2 使用方法 2.1.3 从文件加载程序集 2.1.4 使用方法 2.2 Assembly 使用 2.2.1 获取程序集完全限定名称 2.2.2 Assembl[......] 继续阅读

2019年12月29日 2条评论 3781点热度 0人点赞 痴者工良 阅读全文

通过反射获取到属性名称以及特性后,要获取属性的值。 static void Main(string[] args) { Test test = new Test() { A = 13510[......]继续阅读

2019年12月29日 0条评论 3792点热度 2人点赞 痴者工良 阅读全文

Through reflection, after obtaining the property names and attributes, the next step is to retrieve the values of the properties. static void[......]继续阅读

2019年12月29日 0条评论 3816点热度 2人点赞 痴者工良 阅读全文

文章持续补充中 特性并不是集中在某一命名空间中,而是不同的特性在不同的命名空间下,特性是某一命名空间下提供的语法糖。 有哪些命名空间提供特性:   命名空间   描述 Microsoft.Build.Framework 包含定义任务和记录器与 MSBuild 引擎的交互方式的类型[......] 继续阅读

2019年12月15日 0条评论 2892点热度 0人点赞 痴者工良 阅读全文

The article is continuously being updated. Features are not concentrated in a specific namespace, but rather different features exist under different[......] 继续阅读

2019年12月15日 0条评论 90点热度 0人点赞 痴者工良 阅读全文
12