R
Rich
I want to replace CSomeObject class with some kind of runtime method
that returns type CSomeObject that I can use as cast.
How do I specify type of explicit cast at runtime?
eg:
object object1 = new CSomeObject(22);
object object2 = new CSomeObject(2);
if ( ( runtime method returns class CSomeObject ) object1 > ( runtime
method returns CSomeObject ) object2 )
// ... etc
// won't work because compiler error "Operator '>' cannot be applied to
operands of type 'object' and 'object' " :
if (object1 > object)
// ...etc
Richard
that returns type CSomeObject that I can use as cast.
How do I specify type of explicit cast at runtime?
eg:
object object1 = new CSomeObject(22);
object object2 = new CSomeObject(2);
if ( ( runtime method returns class CSomeObject ) object1 > ( runtime
method returns CSomeObject ) object2 )
// ... etc
// won't work because compiler error "Operator '>' cannot be applied to
operands of type 'object' and 'object' " :
if (object1 > object)
// ...etc
Richard