共用方式為


IModelElement.GetRelationship<TFrom, TTo> 方法 (ModelRelationshipClass)

傳回關聯性,其中,兩個相關項目是指定的型別。

命名空間:  Microsoft.Data.Schema.SchemaModel
組件:  Microsoft.Data.Schema (在 Microsoft.Data.Schema.dll 中)

語法

'宣告
Function GetRelationship(Of TFrom As {Class, IModelElement}, TTo As {Class, IModelElement}) ( _
    relationshipClass As ModelRelationshipClass _
) As IModelRelationship(Of TFrom, TTo)
IModelRelationship<TFrom, TTo> GetRelationship<TFrom, TTo>(
    ModelRelationshipClass relationshipClass
)
where TFrom : class, IModelElement
where TTo : class, IModelElement
generic<typename TFrom, typename TTo>
where TFrom : ref class, IModelElement
where TTo : ref class, IModelElement
IModelRelationship<TFrom, TTo>^ GetRelationship(
    ModelRelationshipClass^ relationshipClass
)
abstract GetRelationship : 
        relationshipClass:ModelRelationshipClass -> IModelRelationship<'TFrom, 'TTo>  when 'TFrom : not struct and IModelElement when 'TTo : not struct and IModelElement
JScript 不支援泛型型別或方法。

型別參數

  • TFrom
    相關 (即左邊) 項目的 Type
  • TTo
    被相關 (即右邊) 項目的 Type

參數

傳回值

型別:Microsoft.Data.Schema.SchemaModel.IModelRelationship<TFrom, TTo>
IModelRelationship<TFrom, TTo> 物件。

.NET Framework 安全性

請參閱

參考

IModelElement 介面

GetRelationship 多載

Microsoft.Data.Schema.SchemaModel 命名空間

ModelRelationshipClass

IModelRelationship<TFrom, TTo>