T_Cyjb_Variant_3 - CYJB/Cyjb GitHub Wiki
提供保有可选类型之一的值的能力。
System.Object
Cyjb.Variant(T1, T2)
Cyjb.Variant(T1, T2, T3)
Cyjb.Variant(T1, T2, T3, T4)
Namespace: Cyjb
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6
C#
public class Variant<T1, T2, T3> : Variant<T1, T2>
- T1
- 第一个可选类型。
- T2
- 第二个可选类型。
- T3
- 第三个可选类型。
名称 | 说明 | |
---|---|---|
![]() |
Variant(T1, T2, T3)(Int32) | 使用指定的值索引初始化 Variant(T1, T2, T3) 结构的新实例。 |
![]() |
Variant(T1, T2, T3)(T1) | 使用指定的值初始化 Variant(T1, T2, T3) 结构的新实例。 |
![]() |
Variant(T1, T2, T3)(T2) | 使用指定的值初始化 Variant(T1, T2, T3) 结构的新实例。 |
![]() |
Variant(T1, T2, T3)(T3) | 使用指定的值初始化 Variant(T1, T2, T3) 结构的新实例。 |
名称 | 说明 | |
---|---|---|
![]() |
Value | 获取或设置当前实例保存的值。 (重写 Variant(T1, T2).Value.) |
![]() |
ValueType | 获取值的类型。 (重写 Variant(T1, T2).ValueType.) |
名称 | 说明 | |
---|---|---|
![]() |
Equals | Determines whether the specified object is equal to the current object. (继承自 Object。) |
![]() |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (继承自 Object。) |
![]() |
GetHashCode | Serves as the default hash function. (继承自 Object。) |
![]() |
GetType | Gets the Type of the current instance. (继承自 Object。) |
![]() |
MemberwiseClone | Creates a shallow copy of the current Object. (继承自 Object。) |
![]() |
ResetValue | 重置所有值。 (重写 Variant(T1, T2).ResetValue(Int32).) |
![]() |
SetValue(T1) | 设置当前对象的值。 (继承自 Variant(T1, T2)。) |
![]() |
SetValue(T2) | 设置当前对象的值。 (继承自 Variant(T1, T2)。) |
![]() |
SetValue(T3) | 设置当前对象的值。 |
![]() |
ToString | Returns a string that represents the current object. (继承自 Object。) |
![]() |
TryGetValue(T1) | 检查当前对象的值是否是 T1,如果是则返回其值。 (继承自 Variant(T1, T2)。) |
![]() |
TryGetValue(T3) | 检查当前对象的值是否是 T3,如果是则返回其值。 |
名称 | 说明 | |
---|---|---|
![]() ![]() |
Explicit(Variant(T1, T2, T3) to T1) | 允许从 Variant(T1, T2, T3) 显式转换为 T1。 |
![]() ![]() |
Explicit(Variant(T1, T2, T3) to T2) | 允许从 Variant(T1, T2, T3) 显式转换为 T2。 |
![]() ![]() |
Explicit(Variant(T1, T2, T3) to T3) | 允许从 Variant(T1, T2, T3) 显式转换为 T3。 |
![]() ![]() |
Implicit(T1 to Variant(T1, T2, T3)) | 允许从 T1 隐式转换为 Variant(T1, T2, T3)。 |
![]() ![]() |
Implicit(T2 to Variant(T1, T2, T3)) | 允许从 T2 隐式转换为 Variant(T1, T2, T3)。 |
![]() ![]() |
Implicit(T3 to Variant(T1, T2, T3)) | 允许从 T3 隐式转换为 Variant(T1, T2, T3)。 |
名称 | 说明 | |
---|---|---|
![]() |
index | 值的索引。 (继承自 Variant(T1, T2)。) |