请大家写下接口和抽象类的区别:An abstract class can still have implementation: it can have member variables or non-abstract methods or properties. An interface can't have implementation or member variables.A .NET class can derive from only one base class, even if that base class is abstract. However, a .NET class can implement as many interfaces as required.An abstract class can derive from any other class or from one or more interfaces. An interface can derive only from other interfaces.An abstract class can have nonpublic (protected or private) methods and properties, even if they are all abstract. In an interface, by definition, all members are public.An abstract class can have static methods and static members and can define constants. An interface can have none of those.An abstract class can have constructors. An interface can't.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货