- 1

C# Fill in the blanks to overload the minus operator for the T class:

public _____ T ________ - (T a, T b) { T res = new T(a.num - b.num); public T - (T a, T b) { T res = new T(a.num - b.num); ________ res; }

18th Apr 2022, 4:00 PM
Pierre Benyamin
3 ответов
+ 1
public static T operator - (T a, T b) { T res = new T(a.num - b.num); return res; }
22nd Apr 2022, 1:19 PM
Alīna Kuzņecova
0
Please Help
18th Apr 2022, 4:05 PM
Pierre Benyamin
0
Have you considered redoing the lesson? Yes, we can help. But not do the entire exercise for you. Pls think it through, reread the lesson, and bring specific questions.
18th Apr 2022, 11:51 PM
Emerson Prado
Emerson Prado - avatar