TypeConverter.GetStandardValues 方法

定义

返回此类型转换器设计用于的数据类型的标准值集合。

重载

GetStandardValues()

从默认的上下文返回此类型转换器设计用于的数据类型的标准值集合。

GetStandardValues(ITypeDescriptorContext)

当与格式上下文一起提供时,返回此类型转换器设计用于的数据类型的标准值集合。

GetStandardValues()

从默认的上下文返回此类型转换器设计用于的数据类型的标准值集合。

public:
 System::Collections::ICollection ^ GetStandardValues();
public System.Collections.ICollection GetStandardValues ();
public System.Collections.ICollection? GetStandardValues ();
member this.GetStandardValues : unit -> System.Collections.ICollection
Public Function GetStandardValues () As ICollection

返回

ICollection

含有一组标准的有效值的 TypeConverter.StandardValuesCollection,或者如果数据类型不支持一组标准值,则为 null

注解

当在此类中实现时,此方法始终返回 null

适用于

GetStandardValues(ITypeDescriptorContext)

当与格式上下文一起提供时,返回此类型转换器设计用于的数据类型的标准值集合。

public:
 virtual System::ComponentModel::TypeConverter::StandardValuesCollection ^ GetStandardValues(System::ComponentModel::ITypeDescriptorContext ^ context);
public virtual System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues (System.ComponentModel.ITypeDescriptorContext context);
public virtual System.ComponentModel.TypeConverter.StandardValuesCollection? GetStandardValues (System.ComponentModel.ITypeDescriptorContext? context);
abstract member GetStandardValues : System.ComponentModel.ITypeDescriptorContext -> System.ComponentModel.TypeConverter.StandardValuesCollection
override this.GetStandardValues : System.ComponentModel.ITypeDescriptorContext -> System.ComponentModel.TypeConverter.StandardValuesCollection
Public Overridable Function GetStandardValues (context As ITypeDescriptorContext) As TypeConverter.StandardValuesCollection

参数

context
ITypeDescriptorContext

提供格式上下文的 ITypeDescriptorContext,可用来提取有关从中调用此转换器的环境的附加信息。 此参数或其属性可以为 null

返回

TypeConverter.StandardValuesCollection

包含标准有效值集的 TypeConverter.StandardValuesCollection;如果数据类型不支持标准值集,则为 null

示例

有关此函数的示例,请参阅 TypeConverter 该类。

注解

如在中 TypeConverter实现的那样,此方法始终返回 null

继承者说明

如果要转换的类型支持标准值,请重写此方法。

另请参阅

适用于