# HierarchicalKey.Create(string)

[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#L82-L83)

```csharp
public static HierarchicalKey Create(string value)
```

Creates one literal segment, escaping slash and backslash characters.

### Parameters

- `value` (`string`): The nonempty literal segment.

### Returns

The segment identity.

### Exceptions

- `System.ArgumentNullException`: `value` is null.
- `System.ArgumentException`: `value` is empty or contains an unpaired surrogate.
