1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-22 22:02:59 +00:00

Fixed type check ExchangeParameters GetValue

This commit is contained in:
Jkorf
2026-02-11 14:50:39 +01:00
parent 813bd9f5a1
commit 226f175343
@@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data.Common;
using System.Linq; using System.Linq;
namespace CryptoExchange.Net.SharedApis namespace CryptoExchange.Net.SharedApis
@@ -99,6 +100,9 @@ namespace CryptoExchange.Net.SharedApis
if (val == null) if (val == null)
return default; return default;
if (val.Value is T typeVal)
return typeVal;
try try
{ {
Type t = Nullable.GetUnderlyingType(typeof(T)) ?? typeof(T); Type t = Nullable.GetUnderlyingType(typeof(T)) ?? typeof(T);