> ## Documentation Index
> Fetch the complete documentation index at: https://adro.codes/llms.txt
> Use this file to discover all available pages before exploring further.

# Condition based type casting

```csharp theme={null}
public void Method(BaseClass entry)
{
  if (entry is not ExtendedClass extendedEntry) {
    return;
  }

  // `extendedEntry` is now of type ExtendedClass
  // if it can't be converted, break out of the function
}
```
