|
CIS 573
- VB.NET, C# and Java Keyword Comparison
last updated: 08/07/2006 |
There are ~145 reserved keywords in VB.NET, ~83 in C#, and 55 in Java 1.5. See also C#/Java 1.5 keywords. Here's MSDN's keyword comparison.
| VB |
C# |
Java |
VB |
C# |
Java |
VB |
C# |
Java |
| --- |
abstract |
abstract |
False | false | false | ByRef |
ref |
--- |
| --- | --- | assert | Finally |
finally |
finally |
REM |
--- |
--- |
| AddHandler | += | --- | --- |
fixed |
--- |
RemoveHandler | -= | --- |
| AddressOf | --- | --- | --- |
float |
float |
Resume | --- | --- |
| Alias | --- | --- | For |
for |
for |
Return |
return |
return |
| And | --- | --- | For Each |
foreach |
--- |
--- |
sbyte |
byte |
| AndAlso | --- | --- | Friend | --- | --- | Select | --- | --- |
| Ansi | --- | -- | Function | --- | --- | --- |
sealed |
final |
| --- |
as |
--- |
Get |
get |
--- |
Set |
set |
--- |
| As | --- | --- | GetType |
--- |
--- |
Shadows | --- | --- |
| Assembly | --- | --- | GoSub1 |
--- |
--- |
Shared | --- | --- |
| Auto | -- | --- | GoTo |
goto |
goto1 |
Short |
short |
short |
| MyBase |
base |
super |
Handles | --- | --- | Single | --- | --- |
| Boolean |
bool |
boolean |
If |
if |
if |
--- |
sizeof |
--- |
| --- |
break |
break |
--- |
implicit |
--- |
--- |
stackalloc |
--- |
| Byte |
byte |
byte |
In |
in |
--- |
Static |
static |
static |
| ByVal | --- | --- | Integer |
int |
int |
--- |
--- |
strictfp |
| Call | --- | --- | Interface |
interface |
interface |
Step | --- | --- |
| Case |
case |
case |
--- |
internal |
protected |
Stop | --- | --- |
| Catch |
catch |
catch |
Is |
is |
instanceof |
String |
string |
--- |
| CBool | --- | --- | Let1 | --- | --- | Structure |
struct |
--- |
| CByte | --- | --- | Lib | --- | --- | Sub | --- | --- |
| CChar | --- | --- | Like | --- | --- | --- |
switch |
switch |
| CDate | --- | --- | SyncLock |
lock |
synchronized |
Then | --- | --- |
| CDec | --- | --- | Long |
long |
long |
Me |
this |
this |
| CDbl | --- | --- | Loop | --- | --- | Throw |
throw |
throw |
| Char |
char |
char |
Loop { While | Until } | --- | --- | --- |
--- |
throws |
| CInt | --- | --- | Mod | --- | --- | --- |
--- |
transient |
| --- |
checked |
--- |
Module | --- | --- | To | --- | --- |
| Class |
class |
class |
MustInherit | --- | --- | True |
true |
true |
| CLng | --- | --- | MustOverride | --- | --- | Try |
try |
try |
| CObj | --- | --- | MyClass | --- | --- | TypeOf |
typeof |
--- |
| Const |
const |
const1 |
NameSpace |
namespace |
package |
--- |
uint |
--- |
| --- |
continue |
continue |
New |
new |
new |
--- |
ulong |
--- |
| CShort | --- | --- | Next | --- | --- | --- |
unchecked |
--- |
| CSng | --- | --- | Not | --- | --- | --- |
unsafe |
--- |
| CStr | --- | --- | Nothing |
null |
null |
--- |
ushort |
--- |
| CType | --- | --- | NotInheritable | --- | --- | Imports |
using |
import |
| Date | --- | --- | NotOverridable | --- | --- | Unicode | --- | --- |
| Decimal |
decimal |
--- |
Object |
object |
--- |
Until | --- | --- |
| Declare { Ansi | Unicode | Auto } | On |
--- |
--- |
--- |
value |
--- | ||
| Default |
default |
default |
--- |
operator |
--- |
--- |
virtual |
--- |
| Delegate |
delegate |
--- |
Option |
--- |
--- |
Variant1 |
--- |
--- |
| Dim | --- | --- | Optional |
--- |
--- |
--- |
void |
void |
| DirectCast | --- | --- | Or |
--- |
--- |
--- |
volatile |
volatile |
| Do |
do |
do |
OrElse |
--- |
--- |
When | --- | --- |
| Do { While | Until } | --- | --- | --- |
out |
--- |
While |
while |
while |
| Double |
double |
double |
Overloads | --- | --- | With | (using) | --- |
| Each | --- | --- | Overridable | --- | --- | WithEvents | --- | --- |
| Else |
else |
else |
Overrides |
override |
--- |
WriteOnly | --- | --- |
| ElseIf | --- | --- | ParamArray | --- | --- | Xor | --- | --- |
| End | --- | --- | --- |
params |
--- |
Inherits |
: |
extends |
| End { If | Function | Sub | Try | While | Get | Set | Property } | --- | --- | Preserve | --- | --- | Implements |
: |
implements |
| Enum |
enum |
enum |
Private |
private |
private |
#Const | --- | --- |
| Erase | --- | --- | Property | --- | --- | #ExternalSource | --- | --- |
| Error | --- | --- | Protected |
protected |
protected |
#If, #Else, #ElseIf, #End If | --- | --- |
| Event |
event |
--- |
Public |
public |
public |
#Region | --- | --- |
| Exit { Do | For | Function | Property | Select | Sub | Try | While } | --- | --- | RaiseEvent | --- | --- | #End Region | --- | --- |
| --- |
explicit |
--- |
ReadOnly |
readonly |
--- |
|||
| --- |
extern |
native |
ReDim |
--- |
--- |
1 Although goto and const are Java keywords, they are unused in the Java language. Likewise, GoSub, Let and Variant are VB.NET keywords, but are unused.
Visitors: