public static string ToSentence(this string text)
{
text = text.Replace("_", " ");
if (string.IsNullOrEmpty(text))
return String.Empty;
var newText = new StringBuilder(text.Length * 2);
newText.Append(text[0]);
for (int i = 1; i < text.Length; i++)
{
char prev = newText[newText.Length - 1];
if (char.IsUpper(text[i]) && prev != ' ' && char.IsLower(prev) && !char.IsWhiteSpace(prev))
newText.Append(' ');
newText.Append(text[i]);
}
return newText.ToString();
}