can anyone tell me why sorting is not working in the below code..........
using System;
class stringarray
{
public static void Main()
{
int n,i;
string [] str= new string[10];
Console.WriteLine("enter the limit:");
n=int.Parse(Console.ReadLine());
for(i=0;i<n;i++)
{
str[i]=Console.In.ReadLine();
}
Array.Sort(str);
for(i=0;i<n;i++)
{
Console.WriteLine("\n"+str[i]);
}
}
}