Saturday, March 5, 2011

Static Keyword in C#

Static Keyword.

  1. A static method can access only static fields.
  2. A static method cannot access non-static fields.
  3. A static method cannot be called using object of a class.
  4. A static method can be called using Class name.
  5. Static fields can be used using Class Name. 

Multiple Inheritance in C#


In C# Multiple Inheritance can be effected using Interface. We can implement multiple interfaces. But we cannot inherit multiple Base Classes.

An Interface in C#


Interface contains the method declarations. It can be implemented by more than one class. Multiple interfaces can be implemented by a single class.