ExtensionMethods.IsAncestorOf<TElementType> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.