|
|
Title | Get a module's fully qualified name in Visual Basic .NET |
Description | This example shows how to get a module's fully qualified name in Visual Basic .NET. |
Keywords | module name, fully qualified name, module location, Visual Basic .NET, VB.NET |
Categories | Software Engineering, VB.NET |
|
|
The GetModuleName function returns the module's fully qualified name. It gets the Type for the Person class and uses that object's Module method to get the module. It then simply returns the module's FullyQualifiedName property.
|
|
Imports System.Reflection
Public Class Person
' Return the module's fully qualified name.
Public Shared Function GetModuleName() As String
Dim my_module As [Module] = GetType(Person).Module
Return my_module.FullyQualifiedName
End Function
...
End Class
|
|
|
|
|
|