home / developersection / tag
You haven’t finished your post yet. Are you sure you want to leave and discard your draft?
Use an abstract class when you need shared fields or partially implemented methods, and an interface when you need a strict contract without implementation.
The Interfaces in C# are provided as a replacement of multiple inheritances.
Inheritance is the one of the most important concept in object oriented programming. Inheritance is used to share properties and method between the related classes.
If an inner class is declared with a public access modifier, it can be instantiated from outside the scope of its enclosing class.
To create a static nested class, we use the static keyword in front of the class declaration, the same way we declare a static field or a method within the enclosing class.
In the previous post, we created a standard interface to get the fuel efficiency of a car. A car has many such standard functions that could be defined in terms of interfaces.
It is possible to extend an existing interface. The purpose behind doing so is to add more declarations, both constants and methods, to an existing interface.
Suppose we are asked to develop communication software such as an FTP (File Transfer Protocol) or Telnet program that uses a modem.