protected static void GetKeyValue(string Text, char Delimiter, out string Key, out string Value) { if (Text == null) throw new ArgumentNullException("Text"); int index = Text.IndexOf(Delimiter); if (index < 1) { Key = Text; Value = string.Empty; return; } Key = Text.Substring(0, index); if (Key.Length == Text.Length) { Value = string.Empty; } else { Value = Text.Substring(index + 1); } }