-
Code's Tags
-
Your Codes
-
Reffers
-
Linked Codes
|
Code:
Short link for Twitter:
HTML:
HTML view:
Copy Source | Copy HTML- class GenericComparer<T> : IComparer<T> where T : IComparable<T>
- {
- public int Compare(T x, T y)
- {
- if (x != null)
- {
- if (y != null)
- {
- return x.CompareTo(y);
- }
- return 1;
- }
- if (y != null)
- {
- return -1;
- }
- return 0;
- }
- }
|