A
Axel Dahmen
Hi,
I want to define a local variable having a type defined somewhere else. Is
this possible in C#?
Here's a more detailed description of what I'm about:
Given a member somewhere in a class:
class C
{public int m;}
In some function I want do define a variable having exact the type of the
member defined above without actually knowing that type, somewhat like:
void f()
{C::m v;}
So if I change the class definition to:
class C
{public double m;}
the local variable v in my function f() becomes of the same type -- double.
TIA,
Axel Dahmen
I want to define a local variable having a type defined somewhere else. Is
this possible in C#?
Here's a more detailed description of what I'm about:
Given a member somewhere in a class:
class C
{public int m;}
In some function I want do define a variable having exact the type of the
member defined above without actually knowing that type, somewhat like:
void f()
{C::m v;}
So if I change the class definition to:
class C
{public double m;}
the local variable v in my function f() becomes of the same type -- double.
TIA,
Axel Dahmen