Code
string[] names = { "张","北","王","成","李","刘","黄"};
Console.WriteLine("排序前:");
foreach(string name in names)
{
Console.WriteLine(name);
}//end foreach
Array.Sort(names);//对数组排序
Console.WriteLine("排序后:");
foreach(string name in names)
{
Console.WriteLine(name);
}//end foreach
string[] names = { "张","北","王","成","李","刘","黄"};
Console.WriteLine("排序前:");
foreach(string name in names)
{
Console.WriteLine(name);
}//end foreach
Array.Sort(names);//对数组排序
Console.WriteLine("排序后:");
foreach(string name in names)
{
Console.WriteLine(name);
}//end foreach