private string getFirstParameter(string lookfor, string textContent) { var first = textContent.IndexOf(lookfor); if (first == -1) return textContent; else return textContent.Substring(0, first); }