C# TypeInfo Module
Description
TypeInfo Module
Gets the module (the DLL) in which the
current Type is defined.
Syntax
TypeInfo.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.
// www.java 2 s . co m
using System;
namespace MyNamespace
{
class MyClass
{
}
}
public class Example
{
public static void Main()
{
Type myType = typeof(MyNamespace.MyClass);
Console.WriteLine("Displaying information about {0}:", myType);
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.