public class Example
{
public static void Main()
{
Console.Write("<< Enumerable.Cast 출력 예제 >> \n");
System.Collections.ArrayList codes = new System.Collections.ArrayList();
codes.Add("codeA");
codes.Add("codeB");
codes.Add("codeC");
IEnumerable<string> query = codes.Cast<string>().OrderBy(code => code).Select(code => code);
foreach (string code in query)
{
Console.WriteLine(code);
}
Console.WriteLine(System.Environment.NewLine);
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
}