サンプルコード
namespace TypeFullName
{
class Program
{
static void Main(string[] args)
{
Type t1 = typeof(TypeFullName.Test1.ClassSample);
Type t2 = typeof(TypeFullName.Test1.ClassSample);
TypeFullName.Test1.ClassSample samp1 = new Test1.ClassSample();
TypeFullName.Test1.ClassSample samp2 = new Test1.ClassSample();
Type t3 = samp1.GetType();
Type t4 = samp2.GetType();
System.Diagnostics.Trace.WriteLine("t1 == t2 : " + (t1 == t2));
System.Diagnostics.Trace.WriteLine("t3 == t4 : " + (t3 == t4));
System.Diagnostics.Trace.WriteLine("t3.Equals(t4) : " + t3.Equals(t4));
}
}
namespace Test1
{
public class ClassSample
{
public int A;
}
}
}
結果
t1 == t2 : True
t3 == t4 : True
t3.Equals(t4) : True
]]>