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

定義

傳回資料型別的標準值集合,這個型別轉換子 (Type Converter) 是針對這個資料型別而設計。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,提供可用於擷取轉換子叫用 (Invoke) 環境之其他資訊的格式內容。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.

另請參閱

適用於