L localhost Dec 16, 2004 #1 How to use Reflection to get the name of the namespace of the current instance of a class? Thanks.
M Matt Berther Dec 16, 2004 #2 Hello localhost, Not necessary to use Reflection... Try this: string ns = this.GetType().Namespace; // C# Dim ns As String = Me.GetType().Namespace '; VB
Hello localhost, Not necessary to use Reflection... Try this: string ns = this.GetType().Namespace; // C# Dim ns As String = Me.GetType().Namespace '; VB
M Mattias Sjögren Dec 18, 2004 #3 Not necessary to use Reflection... Try this: string ns = this.GetType().Namespace; // C# Dim ns As String = Me.GetType().Namespace '; VB Click to expand... Well, here you *are* using reflection. Mattias
Not necessary to use Reflection... Try this: string ns = this.GetType().Namespace; // C# Dim ns As String = Me.GetType().Namespace '; VB Click to expand... Well, here you *are* using reflection. Mattias
M Matt Berther Dec 18, 2004 #4 Hello Mattias, Technically, yes... However, you're not importing the System.Reflection namespace.