I need to convert code from VB to C #. Given the following lines of VB (I think only because the option is not set to strict):
Dim someProp As SomeType Try someProp = CType(SomeInstance, Object).SomeProp ' ...
Due to late binding, this code is possible under VB. Of course, the following will not work under C #:
SomeType someProp; try { someProp = ((object)SomeInstance).SomeProp;
How can I formulate something like this in C #?
thanks for any tips sl3dg3
source share