Q:- Sorting Array in C#???
Ans- using System;
using System.Collections.Generic;
using System.Text;
namespace codeforevenorodd
{
class Program
{
static void Main(string[] args)
{
string[] name=new string[]{"aku" ,"daby" ,"cat"};
Array.Sort(name);
foreach(string i in name)
{
Console.WriteLine(i);
}
Console.ReadLine();
}
}
}
Ans- using System;
using System.Collections.Generic;
using System.Text;
namespace codeforevenorodd
{
class Program
{
static void Main(string[] args)
{
string[] name=new string[]{"aku" ,"daby" ,"cat"};
Array.Sort(name);
foreach(string i in name)
{
Console.WriteLine(i);
}
Console.ReadLine();
}
}
}
No comments:
Post a Comment