Wonderful !
yeah it's returning proper result.....!
 
Thanks for Chris Cottrell, Chris Conboy ,Ashish Gupta, Stephen Russell
 
Regards
bala
 

Ashish Gupta <[EMAIL PROTECTED]> wrote:

Chris means:
 
string mstrName="balaji ranganathan";
System.Globalization.TextInfo objText=System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo;
objText.ToTitleCase(mstrName));

// I have taken the current culture, u can choose your culture

Thanx and Regard
Ashish

 
Chris Conboy <[EMAIL PROTECTED]> wrote:

TextInfoObject.ToTitleCase( )



Chris Cottrell wrote the following - Dated 04/15/2005 9:16 AM:

> How about putting this in a function?
>
> String[] parts = name.Split(" ");
> StringBuilder sb - new StringBuilder();
> for ( int i = 0 ; i <= parts.Length - 1; i++)
> {
>     sb.Append(String.Format("[0][1] ",
> parts[i].Substring(1,1).toUpper() + parts[i].Substring(2)));
> }
>
> return sb.ToString().Trim();
>
> I didn't actually try this so you may need to tweak it a little, but
> this should work.
>
>
> On 4/15/05, balaji ranganathan <[EMAIL PROTECTED]> wrote:
>  >
>  >
>  >
>  > Hi all
>  >
>  > Is any functions exists to get proper case, That means for example i'm
>  > having data like " balaji ranganathan " in database. i want to update
> this
>  > like " Balaji Ranganathan ". And in C# how can i get first letter as
>  > uppercase. i got the below code from Google, But i didn't get the proper
>  > output.
>  >
>  > private string MakeFirstUpperMakePascalCase( string name )
>  > {
>  >         if ( name.Length <= 1) return name.ToUpper();
>  >
>  >         Char[] letters = name.ToCharArray();
>  >         letters[0] = Char.ToUpper( letters[0] );
>  >         return new string( letters );
>  > }
>  >
>  > if i found solution for this i think getting propercase will be easy
>  >
>  > Thanks & Regards
>  > Bala




Thanx and Regards
Ashish


Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!


Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.

Yahoo! Groups Links

Reply via email to