public static Type GetType(string name) { Type type = AsType(name); if (type != null) return type; throw new InvalidOperationException(string.Format("Unknown type '{0}'", name)); }