public new static Company Load(BinaryReader reader) { CompType subType = (CompType)reader.ReadInt32(); int capacity = reader.ReadInt32(); Company ret = null; switch (subType) { case CompType.WAREHOUSE: ret = WareHouse.Load(reader); break; } ret.subType = subType; ret.Capacity = capacity; return(ret); }