Pavan R Bhupalam
Write logic to convert any string to LOWER CASE without using string.ToLower()
By Pavan R Bhupalam in C# on Aug 21 2013
  • Pankaj  Kumar Choudhary
    Aug, 2015 31

    string ucase="ram"; string temp=null; foreach(char c in ucase) { int i=(int)c; if(c>=65 and c<91) { temp+=temp+((char)i+32); } } ucase=temp }

    • 0
  • Ankit Sahu
    Aug, 2015 22

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class ConvertUppertoLowerCase { static void Main() { ConvertUppertoLowerCase p = new ConvertUppertoLowerCase(); Console.WriteLine("Enter any String"); string Str = Console.ReadLine(); p.ToLowerCase(Str); } public void ToLowerCase(string Str) { string temp=""; foreach(char c in Str ) { int i = (int)c; if(i>=65 && i<=90) { i= i+32; } temp += (char)i; } Console.WriteLine(temp); Console.ReadKey(); } } }

    • 0
  • plm
    Sep, 2013 19

    public string ToLowerCase(string ucase) {string temp;foreach(char c in ucase){int i=(int)c;if(c>=65 and c<91){temp+=temp+((char)i+32);}} return temp; }

    • 0
  • Pavan R Bhupalam
    Aug, 2013 21


    public void lower()
            {
                Console.Write("entr d Word : ");
                string low = Console.ReadLine();
                string up = "";
                foreach(char l in low)
                {
                    int x = (int)l;
                    x = x + 32;
                    char c = (char)x;
                    up = up + c;
                }
                Console.WriteLine(up);
            }

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS