#### [Abblix\.Oidc\.Server](https://www.abblix.com/en/docs/api/abblix-oidc-server 'index')
### [Abblix\.Oidc\.Server\.Common\.Exceptions](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Exceptions 'Abblix\.Oidc\.Server\.Common\.Exceptions')

## UnexpectedTypeException Class

Represents an exception that is thrown when an unexpected data type is encountered\.

```csharp
public class UnexpectedTypeException : System.InvalidOperationException
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → [System\.Exception](https://learn.microsoft.com/en-us/dotnet/api/system.exception 'System\.Exception') → [System\.SystemException](https://learn.microsoft.com/en-us/dotnet/api/system.systemexception 'System\.SystemException') → [System\.InvalidOperationException](https://learn.microsoft.com/en-us/dotnet/api/system.invalidoperationexception 'System\.InvalidOperationException') → UnexpectedTypeException

### Remarks
This exception is typically used to indicate an unexpected or invalid type for a parameter or variable\.
It provides information about the parameter name and the unexpected type encountered\.
### Constructors

## UnexpectedTypeException\(string, Type\) Constructor {#Abblix.Oidc.Server.Common.Exceptions.UnexpectedTypeException.UnexpectedTypeException(string,System.Type)}

Creates the exception with a message naming the offending parameter and the runtime type observed\.

```csharp
public UnexpectedTypeException(string? paramName, System.Type paramType);
```
#### Parameters

###### `paramName` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Common.Exceptions.UnexpectedTypeException.UnexpectedTypeException(string,System.Type).paramName}

Name of the variable, parameter, or member whose type was unexpected\.

###### `paramType` [System\.Type](https://learn.microsoft.com/en-us/dotnet/api/system.type 'System\.Type') {#Abblix.Oidc.Server.Common.Exceptions.UnexpectedTypeException.UnexpectedTypeException(string,System.Type).paramType}

The runtime type that the calling code did not know how to handle\.
