Compartir a través de


ExtensionMethods.IsAncestorOf<TElementType> Method

Definition

Determines if a element is an ancestor of another element.

public:
generic <typename TElementType>
 where TElementType : class[System::Runtime::CompilerServices::Extension]
 static bool IsAncestorOf(TElementType element, TElementType other, Func<TElementType, TElementType> ^ parentEvaluator);
public static bool IsAncestorOf<TElementType> (this TElementType element, TElementType other, Func<TElementType,TElementType> parentEvaluator) where TElementType : class;
static member IsAncestorOf : 'ElementType * 'ElementType * Func<'ElementType, 'ElementType (requires 'ElementType : null and 'ElementType : null)> -> bool (requires 'ElementType : null)
<Extension()>
Public Function IsAncestorOf(Of TElementType As Class) (element As TElementType, other As TElementType, parentEvaluator As Func(Of TElementType, TElementType)) As Boolean

Type Parameters

TElementType

Parameters

element
TElementType

The ancestor element.

other
TElementType

The descendent element.

parentEvaluator
Func<TElementType,TElementType>

The function used to determine an element's parent.

Returns

True if element is an ancestor of other, otherwise false.

Applies to