Alternatively, you can use a Regular Expression to get the value, and it will return an matching groups. Regular Expressions sound a bit overkill, but in your example, no knowledge is required.
string text = "ServiceName=";
MatchCollection matches = Regex.Match(sourceString, text, RegexOptions.SingleLine);
//No matches found
foreach(Match m in matches)
//Match is contained at m.Value;
I hope this helps,