public static bool TryParse(string value, out ConformanceEventMode result) { result = default(ConformanceEventMode); if( value=="sender") result = ConformanceEventMode.Sender; else if( value=="receiver") result = ConformanceEventMode.Receiver; else return false; return true; }
public static string ToString(ConformanceEventMode value) { if( value==ConformanceEventMode.Sender ) return "sender"; else if( value==ConformanceEventMode.Receiver ) return "receiver"; else throw new ArgumentException("Unrecognized ConformanceEventMode value: " + value.ToString()); }