Ive the following code:
TConverted ret;
ret = forward.Get<TConverted>(GetForwardKey(id, convType));
if (ret != default(TConverted))... // wrong here !
the generic Get function returns an item from a cache. It can be a value type or a class. I would like to check if the returned value is null or the default, but the code I guess it should work it does not. Is it possible to do?
From this essentially-identical question…
If this is helpful to you, please upvote Mark Gravell’s answer (which I’ve quoted) on the question I linked to.