public class Example
{
public static void Main()
{
string[] lines = new string[]
{
@"textfile.txt",
@"textFile.TXT",
@"Text.txt",
@"testfile2.txt"
};
Console.WriteLine("Non-sorted 상태 :");
foreach (string s in lines)
{
Console.WriteLine($" {s}");
}
Console.WriteLine("\n\rSorted 상태:");
Array.Sort(lines, StringComparer.CurrentCulture);
foreach (string s in lines)
{
Console.WriteLine($" {s}");
}
}
}