M_Cyjb_TypeUtil_GetEncompassingType - CYJB/Cyjb GitHub Wiki
返回 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
。
异常 | 条件 |
---|---|
ArgumentNullException |
types 为 null 。 |
若 A 类型可以隐式类型转换(指预定义的类型转换)为 B 类型,那么就称 A 被 B 包含,而 B 包含 A。