当集合为 null 时,代码如下: List<int>? _a = null; List<int>? _b = null; var a = _a?.Any() == false;[......]继续阅读

2022年8月6日 0条评论 2244点热度 1人点赞 痴者工良 阅读全文

When the collection is null, the code is as follows: List<int>? _a = null; List<int>? _b = null; var[......]继续阅读

2022年8月6日 0条评论 32点热度 1人点赞 痴者工良 阅读全文

基础 Go Web 的表单类型有三种: r.Form r.PostForm r.MultipartForm PostForm 支持 form-data 和 x-www-form-urlencoded 两种请求体,但是不支持上传文件。 MultipartForm 只支持 for[......] 继续阅读

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

Basics There are three types of forms in Go Web: r.Form r.PostForm r.MultipartForm PostForm supports form-data and x-www-form-urlencoded request b[......] 继续阅读

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

reflect.Type.Elem() 可以返回元素的类型,例如指针类型,返回不带指针的类型。 reflect.Value.Elem() 是获取指向值的引用。 type name struct { } func (n name) Print(str string) { } func main([......]继续阅读

2021年11月16日 0条评论 2566点热度 0人点赞 痴者工良 阅读全文

reflect.Type.Elem() can return the type of the element, for example, for pointer types, it returns the type without the pointer. reflect.Value.Elem()[......] 继续阅读

2021年11月16日 0条评论 34点热度 0人点赞 痴者工良 阅读全文

||其代码如下: /// <summary> /// 值类型和字符串互转 /// </summary> public class JsonStringToNumberConverter : JsonConverterFactory {[......]继续阅读

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

/// <summary> /// Convert between value types and strings /// </summary> public class JsonStringToNumberConverter : JsonCo[......]继续阅读

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

本文主要介绍 C# 命名空间 System.Buffers.Binary 中的一些二进制处理类和 Span 的简单使用方法,这些二进制处理类型是上层应用处理二进制数据的基础,掌握这些类型后,我们可以很容易地处理类型和二进制数据之间的转换以及提高程序性能。 C# 原语类型 按照内存分配来区分,C# 有[......] 继续阅读

2021年7月20日 0条评论 2544点热度 0人点赞 痴者工良 阅读全文

This article mainly introduces some binary processing classes and simple usage methods of Span in the C# namespace System.Buffers.Binary. These binary[......] 继续阅读

2021年7月20日 0条评论 58点热度 0人点赞 痴者工良 阅读全文

The static class constructor cannot have access modifiers, cannot be called externally, and has no parameters; The static class constructor is trigge[......] 继续阅读

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

静态类的构造函数不能加上访问修饰符,也不能被外界调用,也没有参数; 静态类的构造函数在创建第一个实例或调用第一个成员前触发调用; 静态类不能被继承; 而单例模式的类型,是一个普通的类型,可以被实例化,能够有多个构造函数;能够被继承; [......] 继续阅读

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

Basic Types and Conversion Operations Data Types The basic types in C language are as follows. | Type | Storage Size | Value Range[......] 继续阅读

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

基本类型和转换操作 数据类型 C语言中的基本类型如下。 类型 存储大小 值范围 char 1 字节 -128 到 127 或 0 到 255 unsigned char 1 字节 0 到 255 signed char 1 字节 -128 到 127 int 2 或 4 字[......] 继续阅读

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

C language does not have a bool type, but many places require true and false. How to solve this? In C language, 1 and 0, or non-zero and 0, are genera[......] 继续阅读

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

C语言中没有 bool 类型,但是很多地方都需要 true 和 flase,怎么解决呢? C 语言 一般使用 1 和 0 或 非0 和 0 表示 true 和 flase。 例如 int a = 6666; int b = 161616; printf("%s",a &[......]继续阅读

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

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

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