# GrainClassMap Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.metadata.grainclassmap/)

## TryGetGrainClass(GrainType, Type) {#trygetgrainclass-orleans-runtime-graintype-out-system-type-1228e4a7}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.metadata.grainclassmap/methods/trygetgrainclass-orleans-runtime-graintype-out-system-type-1228e4a7/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Manifest/GrainClassMap.cs#L39-L60)

```csharp
public bool TryGetGrainClass(GrainType grainType, out Type grainClass)
```

Returns the grain class type corresponding to the provided grain type.

### Parameters

- `grainType` (`GrainType`): Type of the grain.
- `grainClass` (`Type`): The grain class.

### Returns

`true` if a corresponding grain class was found, `false` otherwise.
