Advertisement
maxrusmos

Untitled

Mar 25th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. public int CompareTo(Polinom<T> A) {
  2. return _polinomDictionary.Keys.Max().CompareTo(A._polinomDictionary.Keys.Max());
  3. }
  4.  
  5. int IComparable.CompareTo(object obj) {
  6. if (!(obj is Polinom<T>)) {
  7. throw new ArgumentException("Это не полином", nameof(obj));
  8. }
  9. if (obj is null) {
  10. throw new ArgumentNullException("NULL", nameof(obj));
  11. }
  12. return CompareTo((Polinom<T>)obj);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement