Interface in Dotnet

Document Sample
Interface in Dotnet Powered By Docstoc
					An Interface in C#

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


Method of a sub class overrides the method of an interface




Output
If the method of an interface is not overridden, then the
following error comes.




Error Message




Multiple interfaces can be implemented by a single class
Output




Multiple Class can implement the same interface and can use it,
according to their requirement
Output




Interface cannot contain the definition of a method.
Error Message




Conclusion
Interface can be used in C# for multiple inheritance. This particular point will b covered in
my next article.

				
DOCUMENT INFO
Shared By:
Stats:
views:23
posted:9/1/2012
language:English
pages:6