private static object GetEnumValue (Type type, string value) { try { return Enum.Parse (type, value, true); } catch (Exception) { return null; } }