DataSourceConverter.GetStandardValuesExclusive(ITypeDescriptorContext) 方法

定義

取得值,表示 GetStandardValues() 所傳回的標準值集合是否為所有可能值的清單。

public:
 override bool GetStandardValuesExclusive(System::ComponentModel::ITypeDescriptorContext ^ context);
public override bool GetStandardValuesExclusive (System.ComponentModel.ITypeDescriptorContext context);
override this.GetStandardValuesExclusive : System.ComponentModel.ITypeDescriptorContext -> bool
Public Overrides Function GetStandardValuesExclusive (context As ITypeDescriptorContext) As Boolean

參數

context
ITypeDescriptorContext

ITypeDescriptorContext,可用來取得額外的內容資訊。

傳回

如果從 TypeConverter.StandardValuesCollection 傳回的 GetStandardValues() 是所有可能值的獨佔清單,則為 true;如果可能為其他的值,則為 false

在這個類別中實作時,這個方法永遠傳回 false

備註

如果是獨占清單 (例如在列舉資料型別中),則沒有其他有效值。 如果清單不是獨佔的,則除了提供的標準值清單之外,還有其他有效值 GetStandardValues

給繼承者的注意事項

如果您想要轉換的類型支援標準值,請覆寫這個方法。

可以使用 context 參數來擷取環境的其他資訊,而這個轉換子就是從這個環境叫用的。 這可能是 null ,因此您應該一律檢查。 此外,內容物件的屬性也可能傳回 null

適用於

另請參閱