I Have an array like below code :
struct Book_Struct
{
public string Title;
public string Auther;
public int Date;
public int ID;
}
static void Print(Book_Struct[] a, int b)
{
for (int i = 0; i < b; i++)
{
Console.WriteLine(" Name of Book " + (i + 1) + " is : " + "\" " + a[i].Title + " \"");
Console.WriteLine("Auther of Book " + (i + 1) + " is : " + "\" " + a[i].Auther + " \"");
Console.WriteLine(" Date of Book " + (i + 1) + " is : " + "\" " + a[i].Date + " \"");
Console.WriteLine(" ID of Book " + (i + 1) + " is : " + "\" " + a[i].ID + " \"");
Console.WriteLine("\n---------------------------------\n");
}
}
I want sort this array based on for example Title of Books. How do i it?