How to force overriding a method in a descendant, without having an abstract base class?

前端 未结 14 949
孤城傲影
孤城傲影 2020-12-09 07:24

Question Heading seems to be little confusing, But I will Try to clear my question here.

using System;
using System.Collections.Generic;
usi         


        
14条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-09 08:02

    You could always make SalesPerson's implementation throw a NotImplementedException. :V But contractually, no, you can't do that.

提交回复
热议问题