Home / ASP.NET Wiki / Architecture / Access Modifiers / Interface, abstract, partial and sealed classes

Interface, abstract, partial and sealed classes

 Rate It (9)

Interface

An interface is like a class but all the methods and properties are abstract. An Interface cannot be instantiated like abstract class. All the methods and properties defined in Interface are by default public and abstract.

Interface generally refers to an abstraction that an entity provides of itself to the outside. Interface can help in separating the methods for external and internal communication without effecting in the way external entities interact with the type.. 

 Abstract Class

 An abstract class is a class with at least one method defined as abstract. This type of class cannot be instantiated. An abstract class can have one or more abstract methods and properties and other methods and properties like normal classes.

Partial Class 

A class defined in  two or more files is called a partial class. The keyword partial is used to define the class. When working on large projects, spreading a class over separate files allows multiple programmers to work on it simultaneously. During compile time all the partial class are compiled into one type only.

Sealed Class

 A sealed class is a class that cannot be inherited. Sealed classes are used to restrict the inheritance feature of object oriented programming.


 

Revision number 2, Tuesday, March 24, 2009 2:02:55 PM by vik20000in

Comments

you should talk more about them

Nice little article, it will b lot better if you add some samples with article.

@vik20000in: Very good short notes!

i thimk a little more explanation is needed....

not sufficient explanation, just a surface definition

It is not sufficient explanation need little more.

Related Articles

Security Guidelines and Recommendations

There's a great deal of good prescriptive security guidance out there in the form of whitepapers and books. Whitepapers patterns & practices Security Guidance for .NET Framework 2.0 patterns & practices ASP.NET 2.0 Security Guidance patterns &

javascript replace() function replace only single characters

javascript replace() function replace only single characters I have been trying to use javascript replace() to search and replace special individual characters in a string. But having some difficulties. We can use the following way to solve the following problem

F# Samples

Hi in this post only I want to help some links that will help you with F#. I think that F# is a good tool for different knid of things, so if you are working with that this can help you: http://fsharpsamples.codeplex.com/ http://fsharpnews.blogspot.com/2010

Enterprise Library

Enterprise Library "The patterns & practices Enterprise Library from Microsoft is a library of application blocks designed to assist developers with common enterprise development challenges. Application blocks are a type of guidance, provided as source

Shortcuts

Table of Contents

Top Wiki Contributors

(last 30 days)

  1. abiruban (1)