#region 根据对象名成创建对象
/// <summary>
/// 根据对象名成创建对象
/// </summary>
/// <param name="assemblyName">程序集名称</param>
/// <param name="classFullName">类全称,包括命名空间</param>
/// <returns>对象的实例</returns>
public object Create(string assemblyName, string classFullName)
{
if (string.IsNullOrEmpty(classFullName) || string.IsNullOrEmpty(assemblyName)) return null;
var type = Type.GetType(classFullName + "," + assemblyName);
return type == null ? null : Activator.CreateInstance(type);
}
#endregion
反射创建对象