There is a situation where you need to capital first letter of each word.
You can also say that Title Case to string.
Here are useful code snippets for this.
C# Example :
Output :
VB.net Example :
Output :
You can also say that Title Case to string.
Here are useful code snippets for this.
C# Example :
string strSample = "this is a sample string."; Response.Write( System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(strSample));
Output :
This Is A Sample String.
VB.net Example :
Dim strSample As String = "this is a sample string." Response.Write(System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(strSample))
Output :
This Is A Sample String.
No comments:
Post a Comment