TypeConverter.GetStandardValues TypeConverter.GetStandardValues TypeConverter.GetStandardValues TypeConverter.GetStandardValues Method

定义

返回此类型转换器设计用于的数据类型的标准值集合。Returns a collection of standard values for the data type this type converter is designed for.

重载

GetStandardValues() GetStandardValues() GetStandardValues() GetStandardValues()

从默认的上下文返回此类型转换器设计用于的数据类型的标准值集合。Returns a collection of standard values from the default context for the data type this type converter is designed for.

GetStandardValues(ITypeDescriptorContext) GetStandardValues(ITypeDescriptorContext) GetStandardValues(ITypeDescriptorContext) GetStandardValues(ITypeDescriptorContext)

当与格式上下文一起提供时,返回此类型转换器设计用于的数据类型的标准值集合。Returns a collection of standard values for the data type this type converter is designed for when provided with a format context.

GetStandardValues() GetStandardValues() GetStandardValues() GetStandardValues()

从默认的上下文返回此类型转换器设计用于的数据类型的标准值集合。Returns a collection of standard values from the default context for the data type this type converter is designed for.

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

返回

含有一组标准的有效值的 TypeConverter.StandardValuesCollection,或者如果数据类型不支持一组标准值,则为 nullA TypeConverter.StandardValuesCollection containing a standard set of valid values, or null if the data type does not support a standard set of values.

注解

当在此类中实现时,此方法始终返回 nullAs implemented in this class, this method always returns null.

GetStandardValues(ITypeDescriptorContext) GetStandardValues(ITypeDescriptorContext) GetStandardValues(ITypeDescriptorContext) GetStandardValues(ITypeDescriptorContext)

当与格式上下文一起提供时,返回此类型转换器设计用于的数据类型的标准值集合。Returns a collection of standard values for the data type this type converter is designed for when provided with a format 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 ITypeDescriptorContext ITypeDescriptorContext

提供格式上下文的 ITypeDescriptorContext,可用来提取有关从中调用此转换器的环境的附加信息。An ITypeDescriptorContext that provides a format context that can be used to extract additional information about the environment from which this converter is invoked. 此参数或其属性可以为 nullThis parameter or properties of this parameter can be null.

返回

包含标准有效值集的 TypeConverter.StandardValuesCollection;如果数据类型不支持标准值集,则为 nullA TypeConverter.StandardValuesCollection that holds a standard set of valid values, or null if the data type does not support a standard set of values.

示例

有关此函数的示例, 请参见TypeConverter类。For an example on this function, see the TypeConverter class.

注解

当在中TypeConverter实现时, 此方法null始终返回。As implemented in TypeConverter, this method always returns null.

继承者说明

如果要转换的类型支持标准值, 请重写此方法。Override this method if the type you want to convert supports standard values.

另请参阅

适用于