Summary
An Interface cannot implement methods.
An abstract class can implement methods.
An Interface can only inherit from another Interface.
An abstract class can inherit from a class and one or more interfaces.
An Interface cannot contain fields.
An abstract class can contain fields.
An Interface can contain property definitions.
An abstract class can implement a property.
An Interface cannot contain constructors or destructors.
An abstract class can contain constructors or destructors.
An Interface can be inherited from by structures.
An abstract class cannot be inherited from by structures.
http://en.csharp-online.net/Interfaces_and_Abstract_Classes
[see also
http://en.csharp-online.net/Should_I_use_an_abstract_class_or_an_interface%3F
]
An Interface can support multiple inheritance.
An abstract class cannot support multiple inheritance.
[edit]MSDN references
abstract (C# Reference)
Abstract and Sealed Classes and Class Members (C# Programming Guide)
Interfaces (C# Programming Guide)
Should I use an abstract class or an interface?
Subscribe to:
Post Comments (Atom)
using Microsoft.AspNetCore.Mvc; using System.Xml.Linq; using System.Xml.XPath; //<table class="common-table medium js-table js-stre...
-
Most of the google tutorials on keras do not show how to display a confusion matrix for the solution. A confusion matrix can throw a clear l...
-
Bootstrapping is the process of starting application in angular. The entry point for an angular application is index.html. Index.html loa...
-
This error means you have created the DbContext but not configured/added it to the project using either DI in startup.cs or by using DbCon...
No comments:
Post a Comment