Hi,
In C++ you could define a member offset pointer which worked on any instance
of a class.
i.e.
class MyClass
{
int IntOne;
int IntTwo;
void SetInt(int MyClass::* p)
{
this->*p = 100;
}
}
void Eg()
{
MyClass c;
// Sets c.IntOne
c.SetInt(&MyClass::IntOne);
// Sets c.IntTwo
c.SetInt(&MyClass::IntTwo);
}
A rather simplistic illustration, and my apologies if the syntax isn't
exactly right - I haven't worked with C++ for a couple of years. Is there
anything like this in C# ? I've searched and can't find it.
Thanks,
Adam.
--
- Adam.
==============================
Ad*********@Omnibus.NOSPAMMYSPAMSPAM.co.uk