Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
The following table shows the default values of value types returned by the default constructors. Default constructors are invoked by using the new operator, as follows:
int myInt = new int();
The preceding statement has the same effect as the following statement:
int myInt = 0;
Remember that using uninitialized variables in C# is not allowed.
Value type |
Default value |
|---|---|
false |
|
0 |
|
'\0' |
|
0.0M |
|
0.0D |
|
The value produced by the expression (E)0, where E is the enum identifier. |
|
0.0F |
|
0 |
|
0L |
|
0 |
|
0 |
|
The value produced by setting all value-type fields to their default values and all reference-type fields to null. |
|
0 |
|
0 |
|
0 |
See Also
Reference
Built-In Types Table (C# Reference)