public static string Format(this EventPrivacy val)
{
if (val != EventPrivacy.Private || val != EventPrivacy.Public)
#if !SILVERLIGHT
throw new InvalidEnumArgumentException("val", (int)val, typeof(EventPrivacy));
#else
throw new ArgumentOutOfRangeException("val", "The specified value was not a valid value of EventPrivacy.");
#endif
if (val == EventPrivacy.Public) return "OPEN";
else return "SECRET";
}
}