# HierarchicalKey.Create(ReadOnlySpan&lt;string&gt;)

[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#L93-L104)

```csharp
public static HierarchicalKey Create(params ReadOnlySpan<string> values)
```

Creates a hierarchy from literal segments in root-first order.

### Parameters

- `values` (`ReadOnlySpan<string>`): The nonempty literal segments.

### Returns

A flat canonical identity which owns its immutable backing string.

### Exceptions

- `System.ArgumentNullException`: A segment is null.
- `System.ArgumentException`: The input or a segment is empty, or a segment contains an unpaired surrogate.
