I have a general class (C #),
class MyClass<T> where T : struct, IComparable<T> { public T filelocation; }
T can be either UInt32 or UInt64 (nothing more).
I need to convert filelocation to long to seek in a file ...
I tried the following
long loc = (T)myclass.filelocation; long loc = (T)(object)myclass.filelocation;
But nothing works ...
Any ideas?
source share