关于反射中创建类型实例的两种方法

第一种从构造函数创建对象

object o = null;
System.Type t 
= System.Type.GetType(this.Type);
constructor 
= t.GetConstructor(new Type[0]);  //t.GetConstructor(Type.EmptyTypes)也可以

  o 
= constructor.Invoke(null);

第二种反射的静态方法
object o = null;
System.Type t 
= System.Type.GetType(this.Type);
= System.Activator.CreateInstance(t,true);

Activator 是包含特定的方法,用以在本地或从远程创建对象类型,或获取对现有远程对象的引用。

这两种方法有什么区别呢?
原文地址:https://www.cnblogs.com/king_astar/p/217037.html