M_Cyjb_TypeUtil_GetEncompassingType - CYJB/Cyjb GitHub Wiki

TypeUtil.GetEncompassingType 方法

返回 types 中能够包含其它所有类型的类型(可以从其它所有类型隐式转换而来)。

Namespace: Cyjb
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6

语法

C#

public static Type? GetEncompassingType(
	IEnumerable<Type> types
)

参数

 

types
Type: System.Collections.Generic.IEnumerable(Type)
类型集合。

返回值

Type: Type
types 中能够包含其它所有类型的类型,如果不存在则为 null

Exceptions

 

异常 条件
ArgumentNullException typesnull

Remarks

若 A 类型可以隐式类型转换(指预定义的类型转换)为 B 类型,那么就称 A 被 B 包含,而 B 包含 A。

参见

Reference

TypeUtil 类
Cyjb 命名空间

⚠️ **GitHub.com Fallback** ⚠️