TypeConverter.GetStandardValuesExclusive 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回值,指出從 GetStandardValues() 所傳回的標準值集合是否為獨佔清單。
多載
| GetStandardValuesExclusive() |
傳回值,指出從 GetStandardValues() 所傳回的標準值集合是否為獨佔清單。 |
| GetStandardValuesExclusive(ITypeDescriptorContext) |
使用指定的內容,傳回從 GetStandardValues() 所傳回的標準值集合是否為可能值的獨占清單。 |
GetStandardValuesExclusive()
傳回值,指出從 GetStandardValues() 所傳回的標準值集合是否為獨佔清單。
public:
bool GetStandardValuesExclusive();
public bool GetStandardValuesExclusive ();
member this.GetStandardValuesExclusive : unit -> bool
Public Function GetStandardValuesExclusive () As Boolean
傳回
如果從 true 傳回的 TypeConverter.StandardValuesCollection 是可能值的獨占清單則為 GetStandardValues(),如果其他的值為可能則為 false。
備註
在這個類別中實作時,這個方法永遠傳回 false。
如果是獨占清單 (例如在列舉資料型別中),則沒有其他有效值。 如果不是獨占清單,則除了 GetStandardValues 方法提供的標準值清單之外,可能還有其他有效值。 如果是獨占值,則 GetStandardValues 傳回的清單應該不允許編輯這些值。
適用於
GetStandardValuesExclusive(ITypeDescriptorContext)
使用指定的內容,傳回從 GetStandardValues() 所傳回的標準值集合是否為可能值的獨占清單。
public:
virtual bool GetStandardValuesExclusive(System::ComponentModel::ITypeDescriptorContext ^ context);
public virtual bool GetStandardValuesExclusive (System.ComponentModel.ITypeDescriptorContext context);
public virtual bool GetStandardValuesExclusive (System.ComponentModel.ITypeDescriptorContext? context);
abstract member GetStandardValuesExclusive : System.ComponentModel.ITypeDescriptorContext -> bool
override this.GetStandardValuesExclusive : System.ComponentModel.ITypeDescriptorContext -> bool
Public Overridable Function GetStandardValuesExclusive (context As ITypeDescriptorContext) As Boolean
參數
- context
- ITypeDescriptorContext
提供格式內容的 ITypeDescriptorContext。
傳回
如果從 true 傳回的 TypeConverter.StandardValuesCollection 是可能值的獨占清單則為 GetStandardValues(),如果其他的值為可能則為 false。
備註
在這個類別中實作時,這個方法永遠傳回 false。
如果是獨占清單 (例如在列舉資料型別中),則沒有其他有效值。 如果不是獨占清單,則除了 GetStandardValues 方法提供的標準值清單之外,可能還有其他有效值。 如果是獨占值,則 GetStandardValues 傳回的清單應該不允許編輯這些值。
給繼承者的注意事項
如果您想要轉換的類型支持標準值,請覆寫這個方法。
context 參數可以用於擷取環境的其他資訊,而這個轉換子就是從該環境叫用的。 此參數可以是 null,因此請一律檢查它。 甚至,內容物件上的屬性可能會傳回 null。