complete the branch
This commit is contained in:
1 parent
2c0889f64b
commit
cb20ea41f6
29 files changed
+426
-115
No files matched your search
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
|
||||
namespace HandyControlDemo.Tools
|
||||
{
|
||||
public class AssemblyHelper
|
||||
{
|
||||
private static readonly string NameSpaceStr = typeof(AssemblyHelper).Assembly.GetName().Name;
|
||||
|
||||
public static object CreateInternalInstance(string className)
|
||||
{
|
||||
try
|
||||
{
|
||||
var type = Type.GetType($"{NameSpaceStr}.{className}");
|
||||
return type == null ? null : Activator.CreateInstance(type);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user