Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9247927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:51:33+00:00 2026-06-18T09:51:33+00:00

Something that’s been bugging me while working on a recent project; why doesn’t C#

  • 0

Something that’s been bugging me while working on a recent project; why doesn’t C# have a native function to change a string to title case?

e.g.

string x = "hello world! THiS IS a Test mESSAGE";
string y = x.ToTitle(); // y now has value of "Hello World! This Is A Test Message"

We have .ToLower and .ToUpper, and I appreciate you can use System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase or create a TextInfo object (the same process), but it’s just so… ugly.

Anyone know the reason?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:51:35+00:00Added an answer on June 18, 2026 at 9:51 am

    Actually it has: TextInfo.ToTitleCase

    Why it is there? Because casing depends on current culture. E.g. Turkish cultures have different uppercase and lowercase for ‘i’ and ‘I’ characters. Read more about this here.

    UPDATE: Actually I agree with @Cashley which says that missing ToTitleCase method on String class looks like an oversight of MicroSoft. If you will look on String.ToUpper() or String.ToLower() you will see that both use TextInfo internally:

    public string ToUpper()
    {
        return this.ToUpper(CultureInfo.CurrentCulture);
    }
    
    public string ToUpper(CultureInfo culture)
    {
        if (culture == null)    
            throw new ArgumentNullException("culture");
    
        return culture.TextInfo.ToUpper(this);
    }
    

    So, I think there should be same method for ToTitleCase(). Maybe .NET team decided to add to String class only those methods, which are mostly used. I don’t see any other reason for keeping ToTitleCase away.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Something that has been troubling me for a while: The current wisdom is that
This is something that I cannot believe I have not been able to figure
I just found something that sounds weird with Maven plugin management. While working on
Something that has been bugging me since I read an answer on another stackoverflow
This seems to be something that have been discussed by many. But unfortunately, I
Something that I have been thinking about lately is how do sites such as
something that should be so simple in .net seems to be oh-so-hard. I have
I just came across something that I have to do find_or_create or where(attributes).first_or_create as
Note that I'm asking about something that will call a callback function more often
I have something that should be run at every page_load event in an aspx

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.