IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesVB.Net  Print This     

Base Class (VB.Net and Delphi Prism Cross Reference Guide)

By Mike Prestwood

VB.Net versus Delphi Prism: A side by side comparison between VB.Net and Delphi Prism.

 
OOP Basics
 

Some languages support object-based concepts such as Paradox, Access, and VB Classic. Other languages have OO extensions and fully support object orientation in a hybrid fashion (such as C++ and Dephi for Win32). Finally, some lanages such as C#, VB.Net, Prism, and Java are entirely written in OO. Meaning, every line of code written must occur within a class).

Base Class

[Other Languages] 

Languages Focus

When you create a class, it is either a base class or inherits from another class. Some languages require all classes to inherit from a common base class and some do not.

VB.Net:   System.Object

In VB.Net, the Object keyword is an alias for the base System.Object class and is the single base class all classes ultimately inherit from. Use the Inherits keyword to indicate the parent class and Inherits must precede all declarations in a class.

Syntax Example:  
'Specify both namespace and class:
Public Class Cyborg
Inherits System.Object
End Class
  
'Use Object alias for System.Objct:
Public Class Cyborg
Inherits Object
End Class
  
'Default when not specified is System.Object:
Public Class Cyborg
End Class
Delphi Prism:   System.Object

In Prism, the Object keyword is an alias for the base System.Object class and is the single base class all classes ultimately inherit from.

Syntax Example:  
//Specify both namespace and class:
Cyborg = class(System.Object)
end;
  
//Use Object keyword for System.Object.
Cyborg = class(Object)
end;
  
//When none, default is System.Object.
Cyborg = class
end;












Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


©1995-2025 Prestwood IT Solutions.   [Security & Privacy]