Current .Net Version: 1.1.4322
Home
Articles
Practice C# Online
C# Reference
XML Web Services
RSS Feeds
T-SQL Scripts
Valuable Links
Contact Us
C# Reference
List: Search:

abstract
Is a:Modifier Keyword
Applies to Version:C# 1.0 and later
Namespace:N/A
Assembly:N/A (N/A)
Description:A modifier that can be used with classes, methods, and properties. Abstract classes, methods, and properties MUST be implemented by the deriving class.You cannot define an abstract class as sealed because it MUST be inherited. An abstract method is basically a virtual method. You cannot instantiate an abstract class - it MUST be derived into a new class.
Example(s):// an abstract class public abstract class Test { // an abstract method public abstract int GetInt(); } // a deriving class public class MyTest : Test { // a derived and implemented method // remember, an abstract method is a virtual method public int GetInt() { return 1; } }
 
COPYRIGHT/DISCLAIMER | CONTACT US