Sort int array s
Keywords:
C#
Learn some more C#basics today, such as sorting Int Array:
You can create a category, its properties, and two constructors in the console application:


class Af
{
private int[] myVar;
public int[] MyIntArray
{
get { return myVar; }
set { myVar = value; }
}
public Af()
{
}
public Af(int[] arr)
{
this.myVar = arr;
}
}
Source Code
Next, I'll add to this category how we process data:
If we need to output the result on the screen:


private void Output(int[] sortResult)
{
foreach (var i in sortResult)
{
Console.WriteLine(i);
}
}
private void Output(IOrderedEnumerable<int> sortResult)
{
foreach (var i in sortResult)
{
Console.WriteLine(i);
}
}
Source Code