Ok,
I have a VB.NET base class.
public MustInherit Class asbBaseClass
public Shared ReadOnly property SomeProperty as integer
And I have an implementation
public Class asbConcrete inherits asbBaseClass
Now at some point I write access to the shared member.
say
intA = asbContrete.SomeProperty
Now:
What I need to do in someproperty is ascertain that the caller is the class asbConcrete, as opposed to anything else that might implement it.
Stuffed if I can figure out how to do this. :-(
obviously since it's a shared member there is no "me". There is no "myclass" either.
The closest I can get to is GetType(asbBaseClass) - but I can't find anyway of getting back from there to the caller.
Any bright ideas ???
I have a VB.NET base class.
public MustInherit Class asbBaseClass
public Shared ReadOnly property SomeProperty as integer
And I have an implementation
public Class asbConcrete inherits asbBaseClass
Now at some point I write access to the shared member.
say
intA = asbContrete.SomeProperty
Now:
What I need to do in someproperty is ascertain that the caller is the class asbConcrete, as opposed to anything else that might implement it.
Stuffed if I can figure out how to do this. :-(
obviously since it's a shared member there is no "me". There is no "myclass" either.
The closest I can get to is GetType(asbBaseClass) - but I can't find anyway of getting back from there to the caller.
Any bright ideas ???

But I understand you're trying to bodge something into an existing system rather than produce a new elegant solution.
Comment