public static string ToString(CodeSelectionMode value) { if (value == CodeSelectionMode.Code) { return("code"); } else if (value == CodeSelectionMode.Children) { return("children"); } else if (value == CodeSelectionMode.Descendants) { return("descendants"); } else if (value == CodeSelectionMode.All) { return("all"); } else if (value == CodeSelectionMode.System) { return("system"); } else { throw new ArgumentException("Unrecognized CodeSelectionMode value: " + value.ToString()); } }
public static bool TryParse(string value, out CodeSelectionMode result) { result = default(CodeSelectionMode); if (value == "code") { result = CodeSelectionMode.Code; } else if (value == "children") { result = CodeSelectionMode.Children; } else if (value == "descendants") { result = CodeSelectionMode.Descendants; } else if (value == "all") { result = CodeSelectionMode.All; } else if (value == "system") { result = CodeSelectionMode.System; } else { return(false); } return(true); }
public static bool TryParse(string value, out CodeSelectionMode result) { result = default(CodeSelectionMode); if( value=="code") result = CodeSelectionMode.Code; else if( value=="children") result = CodeSelectionMode.Children; else if( value=="descendants") result = CodeSelectionMode.Descendants; else if( value=="all") result = CodeSelectionMode.All; else if( value=="system") result = CodeSelectionMode.System; else return false; return true; }
public static string ToString(CodeSelectionMode value) { if( value==CodeSelectionMode.Code ) return "code"; else if( value==CodeSelectionMode.Children ) return "children"; else if( value==CodeSelectionMode.Descendants ) return "descendants"; else if( value==CodeSelectionMode.All ) return "all"; else if( value==CodeSelectionMode.System ) return "system"; else throw new ArgumentException("Unrecognized CodeSelectionMode value: " + value.ToString()); }