# HierarchicalKey.IsAncestorOf(HierarchicalKey)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.hierarchicalkey/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.hierarchicalkey/methods/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/Messaging/HierarchicalKey.cs#L154-L156)

```csharp
public bool IsAncestorOf(HierarchicalKey other)
```

Tests whether this key is equal to or an ancestor of the other key.

### Parameters

- `other` (`HierarchicalKey`): The identity to inspect.

### Returns

Whether the full prefix consists of equal ordinal segments. Unset keys return false.
