public Employee(String name, int number, Decimal rate, Double hours) { SetName(name); SetNumber(number); SetRate(rate); SetHours(hours); // Caculates gross pay and asign the value to the variable "gross" if (hours <= 40.0) { gross = (decimal)hours * rate; } else { gross = (40.0m * rate) + ((decimal)hours - 40.0m) * rate * 1.5m; } //gross = (hours <= 40.0) ? (decimal)hours * rate : (40.0m * rate) + ((decimal)hours - 40.0m) * rate * 1.5m; }

Now I am reading a csv file to populatate the class and create an array of employees.

static Employee[] employees = new Employee[100]; //Array of employees static int counter = 0;

Here I populate the array of employees.

// Open the data file StreamReader employeeData = new StreamReader("employees.txt"); String lineOfData; // Holds one line of data from sorce file // Reads a line of data, explode it, and add an entry to the employees array while ((lineOfData = employeeData.ReadLine()) != null) { String[] explode = lineOfData.Split(','); employees[counter++] = new Employee(explode[0], Convert.ToInt32(explode[1]), Convert.ToDecimal(explode[2]), Convert.ToDouble(explode[3])); } // close the data reader employeeData.Close();

Now I want to implement a quick sort to sort the employees array by" employee name, number, rate, hours, and gross pay". I have used the C# sort libraries and bubble sort with no problem, but I have no idea how to go about using quick sort. I am trying to learn some different sorting algorithm Thanks a lot for any help.