# IGrainReferenceRuntime Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.igrainreferenceruntime/)

## Cast(IAddressable, Type) {#cast-orleans-runtime-iaddressable-system-type-0eefe2ff}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.igrainreferenceruntime/methods/cast-orleans-runtime-iaddressable-system-type-0eefe2ff/)

```csharp
public abstract object Cast(IAddressable grain, Type interfaceType)
```

Converts the provided `grain` to the provided `interfaceType`.

### Parameters

- `grain` (`IAddressable`): The grain.
- `interfaceType` (`Type`): The resulting interface type.

### Returns

A reference to `grain` which implements `interfaceType`.

## InvokeMethod(GrainReference, IInvokable, InvokeMethodOptions) {#invokemethod-orleans-runtime-grainreference-orleans-serialization-invocation-iin-9bf3ff62}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.igrainreferenceruntime/methods/invokemethod-orleans-runtime-grainreference-orleans-serialization-invocation-iin-9bf3ff62/)

```csharp
public abstract void InvokeMethod(GrainReference reference, IInvokable request, InvokeMethodOptions options)
```

Invokes the specified void-returning method on the provided grain interface without waiting for a response.

### Parameters

- `reference` (`GrainReference`): The grain reference.
- `request` (`IInvokable`): The method description.
- `options` (`InvokeMethodOptions`): The invocation options.

## InvokeMethodAsync(GrainReference, IInvokable, InvokeMethodOptions) {#invokemethodasync-orleans-runtime-grainreference-orleans-serialization-invocatio-dcd97924}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.igrainreferenceruntime/methods/invokemethodasync-orleans-runtime-grainreference-orleans-serialization-invocatio-dcd97924/)

```csharp
public abstract ValueTask InvokeMethodAsync(GrainReference reference, IInvokable request, InvokeMethodOptions options)
```

Invokes the specified method on the provided grain interface.

### Parameters

- `reference` (`GrainReference`): The grain reference.
- `request` (`IInvokable`): The method description.
- `options` (`InvokeMethodOptions`): The invocation options.

### Returns

A `System.Threading.Tasks.ValueTask` representing the operation

## InvokeMethodAsync(GrainReference, IInvokable, InvokeMethodOptions) {#invokemethodasync-1-orleans-runtime-grainreference-orleans-serialization-invocat-46060b28}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.igrainreferenceruntime/methods/invokemethodasync-1-orleans-runtime-grainreference-orleans-serialization-invocat-46060b28/)

```csharp
public abstract ValueTask<T> InvokeMethodAsync<T>(GrainReference reference, IInvokable request, InvokeMethodOptions options)
```

Invokes the specified method on the provided grain interface.

### Parameters

- `reference` (`GrainReference`): The grain reference.
- `request` (`IInvokable`): The method description.
- `options` (`InvokeMethodOptions`): The invocation options.

### Returns

The result of invocation.
