ObjectPropertyProvider.TryGetPropertyValue 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
擷取一個表示屬性值是否屬於物件屬性的值。
多載
| 名稱 | Description |
|---|---|
| TryGetPropertyValue(String, Object) |
取得一個表示要取得屬性值的值。 此類別無法獲得繼承。 |
| TryGetPropertyValue<T>(String, T) |
擷取一個表示屬性值是否屬於物件屬性的值。 此類別無法獲得繼承。 |
TryGetPropertyValue(String, Object)
取得一個表示要取得屬性值的值。 此類別無法獲得繼承。
public:
virtual bool TryGetPropertyValue(System::String ^ name, [Runtime::InteropServices::Out] System::Object ^ % value);
public bool TryGetPropertyValue(string name, out object value);
abstract member TryGetPropertyValue : string * obj -> bool
override this.TryGetPropertyValue : string * obj -> bool
Public Function TryGetPropertyValue (name As String, ByRef value As Object) As Boolean
參數
- name
- String
一個代表該物業名稱的字串。
- value
- Object
代表該屬性價值的物件。
傳回
true表示物件屬性值的值;否則,。 false
實作
適用於
TryGetPropertyValue<T>(String, T)
擷取一個表示屬性值是否屬於物件屬性的值。 此類別無法獲得繼承。
public:
generic <typename T>
virtual bool TryGetPropertyValue(System::String ^ name, [Runtime::InteropServices::Out] T % value);
public bool TryGetPropertyValue<T>(string name, out T value);
abstract member TryGetPropertyValue : string * 'T -> bool
override this.TryGetPropertyValue : string * 'T -> bool
Public Function TryGetPropertyValue(Of T) (name As String, ByRef value As T) As Boolean
類型參數
- T
價值的通用類型。
參數
- name
- String
屬性的名稱。
- value
- T
代表該屬性價值的物件。
傳回
true若屬性值屬於物件屬性;否則,。 false