# HierarchicalKey.Parse(ReadOnlySpan&lt;char&gt;, IFormatProvider?)

[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)

```csharp
public static HierarchicalKey Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)
```

Parses a span of characters into a value.

### Parameters

- `s` (`ReadOnlySpan<char>`): The span of characters to parse.
- `provider` (`IFormatProvider?`): An object that provides culture-specific formatting information about `s`.

### Returns

The result of parsing `s`.

### Exceptions

- `System.FormatException`: `s` is not in the correct format.
- `System.OverflowException`: `s` is not representable by `TSelf`.
