共用方式為


BindingContext.GetInnerProperty<T> 方法

定義

從繫結堆疊的適當層次中,傳回要求的型別物件 (如果有)。

public:
generic <typename T>
 where T : class T GetInnerProperty();
public T GetInnerProperty<T> () where T : class;
member this.GetInnerProperty : unit -> 'T (requires 'T : null)
Public Function GetInnerProperty(Of T As Class) () As T

類型參數

T

此方法正在查詢的型別物件。

傳回

T

要求的型別物件 T (如果存在的話),如果不存在則為 null

範例

CustomBinding binding = new CustomBinding();
BindingParameterCollection bpCol = new BindingParameterCollection();
BindingContext context = new BindingContext(binding, bpCol);
XmlDictionaryReaderQuotas quotas = context.GetInnerProperty<XmlDictionaryReaderQuotas>();
Dim binding As New CustomBinding()
Dim bpCol As New BindingParameterCollection()
Dim context As New BindingContext(binding, bpCol)
Dim quotas As XmlDictionaryReaderQuotas = context.GetInnerProperty(Of XmlDictionaryReaderQuotas)()

備註

複製繫結內容,並在繫結內容中所儲存的下一個繫結項目上呼叫 GetProperty<T>(BindingContext)

適用於