public static void LoadAll() { Assembly dndCore = typeof(BaseContext).Assembly; foreach (Type type in dndCore.GetTypes()) { if (!type.IsClass) { continue; } if (type.BaseType == typeof(BaseContext)) { Expressions.AddVariable((DndVariable)Activator.CreateInstance(type)); } } }