Share via


GetAncestor(T) Method

Namespace:  Microsoft.Data.Tools.Model.Util
Assembly:  Microsoft.Data.Tools.Model (in Microsoft.Data.Tools.Model.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function GetAncestor(Of T As IModelObject) ( _
    node As IModelObject _
) As T
'Usage
Dim node As IModelObject
Dim returnValue As T

returnValue = node.GetAncestor()
public static T GetAncestor<T>(
    this IModelObject node
)
where T : IModelObject
[ExtensionAttribute]
public:
generic<typename T>
where T : IModelObject
static T GetAncestor(
    IModelObject^ node
)
static member GetAncestor : 
        node:IModelObject -> 'T  when 'T : IModelObject
JScript does not support generic types and methods.

Type Parameters

  • T

Parameters

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IModelObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.103) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.103).

See Also

Reference

ModelExtensions Class

Microsoft.Data.Tools.Model.Util Namespace