ReferenceConverter.GetStandardValues(ITypeDescriptorContext) 方法
定义
获取引用数据类型的标准值的集合。Gets a collection of standard values for the reference data type.
public:
override System::ComponentModel::TypeConverter::StandardValuesCollection ^ GetStandardValues(System::ComponentModel::ITypeDescriptorContext ^ context);
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues (System.ComponentModel.ITypeDescriptorContext context);
override this.GetStandardValues : System.ComponentModel.ITypeDescriptorContext -> System.ComponentModel.TypeConverter.StandardValuesCollection
Public Overrides Function GetStandardValues (context As ITypeDescriptorContext) As TypeConverter.StandardValuesCollection
参数
- context
- ITypeDescriptorContext
一个 ITypeDescriptorContext,用于提供格式上下文。An ITypeDescriptorContext that provides a format context.
返回
包含标准有效值集的 TypeConverter.StandardValuesCollection;如果数据类型不支持标准值集,则为 null。A TypeConverter.StandardValuesCollection that holds a standard set of valid values, or null if the data type does not support a standard set of values.
注解
context 参数可用于提取有关从中调用该转换器的环境的附加信息。The context parameter can be used to extract additional information about the environment this converter is being invoked from. 此参数可能为 null,因此总是需要检查。This can be null, so always check. 同样,上下文对象的属性可以返回 null。Also, properties on the context object can return null.