You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add `delegate` to builtin types
Fixes#44868
Add the `delegate` keyword to the list of builtin types (it was already covered under the builtin reference types).
General edit. Cleanup the description of `dynamic` to point out the differences between `dynamic` and `object`/
* format tables
In the preceding tables, each C# type keyword from the left column (except [dynamic](reference-types.md#the-dynamic-type)) is an alias for the corresponding .NET type. They're interchangeable. For example, the following declarations declare variables of the same type:
40
+
In the preceding tables, the C# type keyword from the left column (except[delegate](reference-types.md#the-delegate-type) and[dynamic](reference-types.md#the-dynamic-type)) is an alias for the corresponding .NET type. They're interchangeable. For example, the following declarations declare variables of the same type:
40
41
41
42
```csharp
42
43
inta=123;
43
44
System.Int32b=123;
44
45
```
45
46
47
+
The `dynamic` type is similar to `object`. The main differences are:
48
+
49
+
- Operations on a `dynamic` expression are bound at runtime, not at compile time.
50
+
- You can't use `new dynamic()`.
51
+
- You can't derive a type from the `dynamic` type.
52
+
53
+
The `delegate` keyword declares a type derived from <xref:System.Delegate?displayProperty=nameWithType>. `System.Delegate` type is an abstract type.
54
+
46
55
The [`void`](void.md) keyword represents the absence of a type. You use it as the return type of a method that doesn't return a value.
47
56
48
57
The C# language includes specialized rules for the <xref:System.Span`1?displayProperty=fullName> and <xref:System.ReadOnlySpan`1?displayProperty=fullName> types. These types aren't classified as built-in types, because there aren't C# keywords that correspond to these types. The C# language defines implicit conversions from array types and the string type to `Span<T>` and `ReadOnlySpan<T>`. These conversions integrate `Span` types into more natural programming scenarios. The following conversions are defined as *implicit span conversions*:
0 commit comments