C# Type Module
Description
Type Module
gets the module (the DLL) in which the current
Type is defined.
Syntax
Type.Module
has the following syntax.
public abstract Module Module { get; }
Example
This following example demonstrates a use of the Namespace and Module properties and the ToString method of Type.
using System;//from ww w . j a v a 2 s .c om
namespace MyNamespace
{
class MyClass
{
}
}
public class Example
{
public static void Main()
{
Type myType = typeof(MyNamespace.MyClass);
Console.WriteLine(" Namespace: {0}.", myType.Namespace);
Console.WriteLine(" Module: {0}.", myType.Module);
Console.WriteLine(" Fully qualified name: {0}.", myType.ToString());
}
}
The code above generates the following result.