O
Oenone
I am trying to write a generic piece of code that I can copy between
projects that uses the current project's root namespace as part of its
function.
I can easily retrieve this value when I am running in a class by doing the
following:
\\\
Dim namespace As String = Me.GetType.Namespace
///
This returns the value I am looking for. However, I want to be able to place
this code into a module. Me.GetType is not valid in this circumstance as
'Me' cannot be used within a module.
I can get this working by creating an instance of an arbitrary object within
my project and calling GetType on it, but as the classes differ from one
project to another I won't be able to copy-and-paste the code without having
to make changes to it.
Is there an easy way to do what I'm trying to do?
Thanks,
projects that uses the current project's root namespace as part of its
function.
I can easily retrieve this value when I am running in a class by doing the
following:
\\\
Dim namespace As String = Me.GetType.Namespace
///
This returns the value I am looking for. However, I want to be able to place
this code into a module. Me.GetType is not valid in this circumstance as
'Me' cannot be used within a module.
I can get this working by creating an instance of an arbitrary object within
my project and calling GetType on it, but as the classes differ from one
project to another I won't be able to copy-and-paste the code without having
to make changes to it.
Is there an easy way to do what I'm trying to do?
Thanks,