C#C
C#2y ago
PAN1K

Json Serializer implicit conversion

I'm trying to implement a
GetAsync<T>(CacheKey key)
method for Redis.

The issue is that when T is string the method can't deserialize the value to string, as the value is already a string.

I can do an if check for string type but I wonder if there is another way
Was this page helpful?