[SOLVED] Write a generic method that accepts ...

20.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon SortOrderDemo.zip (0.6 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (2 votes)

Write a generic method that accepts three parameters of the same type and displays them in order. For numeric data, “in order” means in numerical order. For other classes, you can define “in order” appropriately. Test the method using at least four different data types, including at least one for which you implement a CompareTo() method.

Having hard time to solve this…

public class SortOrderDemo

{

public static T SortOrder<T> (T x, T y, T z) where T : IComparable<T>

//can’t think of a logic after this..

  • SortOrderDemo.zip