A type has Namespace
, Name
, and FullName
properties.
In most cases, FullName
is a composition of the former two:
using System;
using System.Reflection;
using System.Collections.Generic;
class MainClass
{
static void Main()
{
Type t = typeof(System.Text.StringBuilder);
Console.WriteLine(t.Namespace); // System.Text
Console.WriteLine (t.Name); // StringBuilder
Console.WriteLine (t.FullName); // System.Text.StringBuilder
}
}
The output:
System.Text
StringBuilder
System.Text.StringBuilder
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |