从旧版中移植,Prefab未确认
This commit is contained in:
@@ -2104,3 +2104,18 @@ namespace Convention
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Convention
|
||||
{
|
||||
public static partial class ConventionUtility
|
||||
{
|
||||
public static object GetDefault([In] Type type)
|
||||
{
|
||||
if (type.IsClass)
|
||||
return null;
|
||||
else
|
||||
return Activator.CreateInstance(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user