✅ Casting from one generic type to another
Hi,
I've got the following:
However, it's telling me that I can't do this as it can't cast
How would I go about getting it to allow this, as I specifically only want to get to that point in the code if they are of the same type.
The reason for doing it like this is because I need to keep a reference to the base class elsewhere where I don't know the type.
Thanks
I've got the following:
However, it's telling me that I can't do this as it can't cast
Value to TValue.How would I go about getting it to allow this, as I specifically only want to get to that point in the code if they are of the same type.
The reason for doing it like this is because I need to keep a reference to the base class elsewhere where I don't know the type.
Thanks