C# does not allow to change the return type of a method by simply overriding it.
If we are talking about methods' overloading, then it is done by changing their parameters, but not the return type.
There are other ways to change the return type of a method, though. For example through:
- creating a generic base class
- using extension methods and a marker interface
Ввійдіть щоб вподобати
Ввійдіть щоб прокоментувати