---
title: "System::Text::Json::ThrowHelper::GetJsonElementWrongTypeException method"
url: "https://reference.aspose.com/pdf/cpp/system.text.json/throwhelper/getjsonelementwrongtypeexception/"
product: "Aspose.PDF for C++ API Reference"
description: "How to use GetJsonElementWrongTypeException method of System::Text::Json::ThrowHelper class in C++."
---

## ThrowHelper::GetJsonElementWrongTypeException(JsonValueKind, JsonValueKind) method




```cpp
static InvalidOperationException System::Text::Json::ThrowHelper::GetJsonElementWrongTypeException(JsonValueKind expectedType, JsonValueKind actualType)
```

## See Also

* Enum [JsonValueKind](../../jsonvaluekind/)
* Class [ThrowHelper](../)
* Namespace [System::Text::Json](../../)
* Library [Aspose.PDF for C++](../../../)
## ThrowHelper::GetJsonElementWrongTypeException(String, JsonValueKind) method




```cpp
static InvalidOperationException System::Text::Json::ThrowHelper::GetJsonElementWrongTypeException(String expectedTypeName, JsonValueKind actualType)
```

## See Also

* Class [String](../../../system/string/)
* Enum [JsonValueKind](../../jsonvaluekind/)
* Class [ThrowHelper](../)
* Namespace [System::Text::Json](../../)
* Library [Aspose.PDF for C++](../../../)
