コード例 #1
0
 public virtual Item GenerateItem(Type type)
 {
     if (typeof(Item).IsAssignableFrom(type))
     {
         return(Utility.CreateInstance <Item>(type));
     }
     else
     {
         throw new Exception(String.Format("Type {0} is not assignable to type 'Server.Item'", type.FullName));
     }
 }