# Response Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.invocation.response/)

## Dispose {#dispose-fbd3d9eb}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.invocation.response/methods/dispose-fbd3d9eb/)

```csharp
public abstract void Dispose()
```

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

## FromException(Exception) {#fromexception-system-exception-9f9a8d8a}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.invocation.response/methods/fromexception-system-exception-9f9a8d8a/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Invocation/Response.cs#L26)

```csharp
public static Response FromException(Exception exception)
```

Creates a new response representing an exception.

### Parameters

- `exception` (`Exception`): The exception.

### Returns

A new response.

## FromResult(TResult) {#fromresult-1-tresult-6f02c9fb}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.invocation.response/methods/fromresult-1-tresult-6f02c9fb/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Invocation/Response.cs#L36-L38)

```csharp
public static Response FromResult<TResult>(TResult value)
```

Creates a new response object which has been fulfilled with the provided value.

### Parameters

- `value` (`TResult`): The value.

### Returns

A new response.

## GetResult {#getresult-1-0b62d84b}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.invocation.response/methods/getresult-1-0b62d84b/)

```csharp
public abstract T GetResult<T>()
```

## GetSimpleResultType {#getsimpleresulttype-e04a02f7}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.invocation.response/methods/getsimpleresulttype-e04a02f7/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Invocation/Response.cs#L49)

```csharp
public virtual Type? GetSimpleResultType()
```

## ToString {#tostring-517e4225}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.invocation.response/methods/tostring-517e4225/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Invocation/Response.cs#L61)

```csharp
public override string ToString()
```

Returns a string that represents the current object.

### Returns

A string that represents the current object.
