Archive for January, 2009

Keywords Compared in Different Languages

January 1, 2009

This topic lists common programming tasks that can be summarized with a language keyword. For more information about tasks that need code examples,

Purpose

Visual Basic
C++
C#
JScript
Visual FoxPro

Declare a variable
Dim
declarators (concept, not keyword)
declarators (keywords include user-defined types and built-in types)
var
[implicit declaration]

 
 

Public
PUBLIC

 
 

Friend
LOCAL

 
 

Protected
PRIVATE

 
 

Private
 

 
 

Shared
 

 
 

Static1
 

Declare a named constant
Const
const
const
const
#DEFINE

 

readonly

Create a new instance of a class
New
new
new
new
NEWOBJECT( )function

 

gcnew

Create a new object
New
CoCreateInstance() (for COM objects)
new 
newActiveXObject()
CREATEOBJECT( )function

 

CreateObject() for [...]