internal static MethodInfo GetInitializeObjectMethod(ItemCategory item_category) { MethodInfo magicMethod = item_category .GetType() .GetMethod("InitializeObject", BindingFlags.Instance | BindingFlags.Public, null, new Type[] { typeof(bool), typeof(int), typeof(int), typeof(ItemCategory.Property), typeof(ItemCategory), typeof(float), typeof(bool) }, null); return(magicMethod); }