# MessageId.Parse(string, IFormatProvider?)

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

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/Messaging/MessageId.cs)

```csharp
public static MessageId Parse(string s, IFormatProvider? provider = null)
```

Parses a string into a value.

### Parameters

- `s` (`string`): The string to parse.
- `provider` (`IFormatProvider?`): An object that provides culture-specific formatting information about `s`.

### Returns

The result of parsing `s`.

### Exceptions

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