# MessageId.TryParse(string?, IFormatProvider?, MessageId)

[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 bool TryParse(string? s, IFormatProvider? provider, out MessageId result)
```

Tries to parse a string into a value.

### Parameters

- `s` (`string?`): The string to parse.
- `provider` (`IFormatProvider?`): An object that provides culture-specific formatting information about `s`.
- `result` (`MessageId`): When this method returns, contains the result of successfully parsing `s` or an undefined value on failure.

### Returns

`true` if `s` was successfully parsed; otherwise, `false`.
