Use following
static string DoFormatting(string strValue)
{
if (!strValue.Contains("_"))
{
return strValue.ToUpper();
}
var splitValues = strValue.Split('_');
string returnValue = splitValues[0].ToUpper();
return string.Concat(returnValue, "_", splitValues[1].Substring(0, 1).ToUpper(),
splitValues[1].Substring(1, splitValues[1].Length - 1));
}
Mark Answered, if it solves your question and Vote if you found it helpful.
Rohit Arora
No comments:
Post a Comment