private object ParseEnum(Type t, string requestedValue, string key) { try { return Enum.Parse(t, requestedValue, true); } catch (ArgumentException) { throw new InvalidOperationException(String.Format( Resources.InvalidConnectionStringValue, requestedValue, key)); } }