C# has common types with the following suffixes, and the author has summarized their general uses. Extensions Helper or Helpers Scheme Builder Contex[......] 继续阅读

2020年3月14日 0条评论 78点热度 0人点赞 痴者工良 阅读全文

分析器名为 miniprofiler,官网地址为 https://miniprofiler.com/dotnet/ 可以直接放到代码中,发布后运行测试。 支持以下框架的性能分析: ASP.NET ASP.NET Core Console .NET Console .NET Core EF6 EF[......] 继续阅读

2020年3月2日 2条评论 4224点热度 2人点赞 痴者工良 阅读全文

The analyzer is named miniprofiler, and the official website is https://miniprofiler.com/dotnet/. It can be directly integrated into the code and run[......] 继续阅读

2020年3月2日 2条评论 4216点热度 2人点赞 痴者工良 阅读全文

如果写 C# 时,使用了分析器,很可能会提示 string.ToString() 的行为可能因当前用户的区域设置而异 这里针对某些字符/字符串转换时出现的问题,做个列表。 IFormatProvider 这个接口用于实现字符串如何格式化转为数值类型。一般来说666、0.666 这样的数没问题,但是[......] 继续阅读

2020年2月26日 4条评论 88点热度 3人点赞 痴者工良 阅读全文

如果写 C# 时,使用了分析器,很可能会提示 string.ToString() 的行为可能因当前用户的区域设置而异 这里针对某些字符/字符串转换时出现的问题,做个列表。 IFormatProvider 这个接口用于实现字符串如何格式化转为数值类型。一般来说666、0.666 这样的数没问题,但是使[......] 继续阅读

2020年2月26日 4条评论 5059点热度 3人点赞 痴者工良 阅读全文

1. Determine Type Determine Whether Some Type 1.1 Classes and Delegates 1.1.1 Determine Whether Type or Delegate 1.1.2 Determine Whether Generic 1[......] 继续阅读

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

1,判断类型 判断是否某种类型 1.1 类和委托 1.1.1 判断是否类型或委托 1.1.2 判断是否泛型 1.1.3 泛型的参数名称和泛型限定 泛型约束 GenericParameterAttributes 枚举 泛型约束关系 1.1.4 是否委托 1.1.5 访问修饰符 1.1.6 密封类、[......] 继续阅读

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

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条评论 3293点热度 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条评论 58点热度 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条评论 4492点热度 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条评论 4480点热度 0人点赞 痴者工良 阅读全文

1,编写依赖注入框架 1.1 路由索引 1.1.1 判断控制器 Controller 是否存在 1.1.2 判断 Action 是否存在 1.2 依赖实例化 1.3 实例化类型、依赖注入、调用方法 2,编写控制器和参数类型 2.1 编写类型 2.2 实现控制器 3,实现低配山寨 ASP.NE[......] 继续阅读

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

1. Writing a Dependency Injection Framework 1.1 Routing Index 1.1.1 Checking if the Controller exists 1.1.2 Checking if the Action exists 1.2 De[......] 继续阅读

2020年1月12日 1条评论 11940点热度 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条评论 3259点热度 0人点赞 痴者工良 阅读全文

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

2020年1月11日 1条评论 3245点热度 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条评论 100点热度 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条评论 3305点热度 0人点赞 痴者工良 阅读全文

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条评论 100点热度 1人点赞 痴者工良 阅读全文

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条评论 3052点热度 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条评论 3736点热度 1人点赞 痴者工良 阅读全文
191011121316