Wednesday 9 August 2017

How to sort the name in alphabatically order using c#.net


Hello Friends,
           Now I am going to describe  how to sorting the different names in alphabetical order in c#.net.

Code of C#.net:
Simple create the console application and write this code:


class Program
    {
        static void Main(string[] args)
        {
            List<string> arr = new List<string>();
            {
                arr.Add("dotnet");
                arr.Add("java");
                arr.Add("angular");
                arr.Add("wcf");
                arr.Add("mvc");
                arr.Add("sql");
                arr.Sort();
                Console.WriteLine("Your sorted array is :");
                foreach (string sortarr in arr)
                Console.WriteLine(sortarr);
            }
            Console.ReadLine();
        }
    }
              I've explained how to sorting the different names in alphabetical order in c#.net.So after read please Comments and suggestions.

Thanks & Regard
Rabi

No comments:

Post a Comment