This version treats the input string as an indexed string. The code is a little shorter.
private string createDisplayText(string propertyName)
{
if (String.IsNullOrEmpty(propertyName))
{
return String.Empty;
}
StringBuilder builder = new StringBuilder();
builder.Append(char.ToUpper(propertyName[0]));
for (int i = 1; i < propertyName.Length; ++i)
{
builder.Append((char.IsUpper(propertyName, i)) ? " " +
propertyName[i].ToString() : propertyName[i].ToString());
}
return builder.ToString();
}