# DurableVersion.Get

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durableversion/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durableversion/methods/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableVersion.cs#L66-L68)

```csharp
public int Get()
```

Returns the version of this change which the running durable task follows.

### Returns

A version from [DurableVersion](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durableversion/) to [DurableVersion](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durableversion/).

### Exceptions

- `Orleans.Durable.Tasks.DurableTaskAttemptCanceledException`: The host canceled the attempt, for example because the execution recorded a version outside the supported range, which stalls it; the exception's inner exception is then a [DurableTaskVersionException](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletaskversionexception/).
- `System.InvalidOperationException`: The host can't record the version from the calling code, for example after `ConfigureAwait(false)`.
