Change string case

We can use ToUpper and ToLower to change the string case.

using System;

class Sample
    public static void Main()
        string s = "";



The output:


ToUpper and ToLower methods do the conversion based on user's locale.

To ignore the user's locale and do the conversion based on English locale we can use the ToUpperInvariant and ToLowerInvariant.  |  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.