G
Guest
I may be putting too fine a point on this, but I'd like to be able to know
the class name of a shared method from within the method.
BTW, the shared method is in a "MustInherit" class.
So it looks like this...
Public MustInherit Class BaseClass
Public Shared Sub DoIt()
' Need to know which class is "running"
' There is no "me" because the method is Shared
End Sub
End Class
Public Class DerivedClass
Inherits BaseClass
End Class
Calling Code would look like this...
DerivedClass.DoIt()
PS. DoIt needs the class name to do a lookup of user rights to that class.
The lookup procedure is the same for all classes - hence the shared method.
I realize I could always use a parm to pass the class name...
DerivedClass.DoIt("DerivedClass")
But it's cleaner if the DoIt method figures out the class name on its own.
Thanks.
BBM
the class name of a shared method from within the method.
BTW, the shared method is in a "MustInherit" class.
So it looks like this...
Public MustInherit Class BaseClass
Public Shared Sub DoIt()
' Need to know which class is "running"
' There is no "me" because the method is Shared
End Sub
End Class
Public Class DerivedClass
Inherits BaseClass
End Class
Calling Code would look like this...
DerivedClass.DoIt()
PS. DoIt needs the class name to do a lookup of user rights to that class.
The lookup procedure is the same for all classes - hence the shared method.
I realize I could always use a parm to pass the class name...
DerivedClass.DoIt("DerivedClass")
But it's cleaner if the DoIt method figures out the class name on its own.
Thanks.
BBM