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
- The deterministic compiler option ensures that subsequent compilations of the same source generate the same binary output.
37
39
38
40
The overall effect of these features is that you write more concise code
39
41
that is also more readable. The syntax contains less ceremony for many
@@ -573,3 +575,12 @@ a lambda expression as an argument:
573
575
574
576
The C# 6 compiler correctly determines that `Task.Run(Func<Task>())` is
575
577
a better choice.
578
+
579
+
### Deterministic compiler output
580
+
581
+
The `-deterministic` option instructs the compiler to produce a byte-for-byte identical output assembly for successive compilations of the same source files.
582
+
583
+
By default, every compilation produces unique output on each compilation. The compiler adds a timestamp, and a GUID generated from random numbers. You use this option if you want to compare the byte-for-byte output to ensure consistency across builds.
584
+
585
+
For more information, see the [-deterministic compiler option](../language-reference/compiler-options/deterministic-compiler-option.md) article.
Copy file name to clipboardExpand all lines: docs/csharp/whats-new/csharp-7-3.md
+13-18Lines changed: 13 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ ms.date: 05/16/2018
5
5
---
6
6
# What's new in C# 7.3
7
7
8
-
There are two main themes to the C# 7.3 release. One theme provides features that enable safe code to be as performant as unsafe code. The second theme provides incremental improvements to existing features. In addition, new compilers were added in this release.
8
+
There are two main themes to the C# 7.3 release. One theme provides features that enable safe code to be as performant as unsafe code. The second theme provides incremental improvements to existing features. In addition, new compiler options were added in this release.
9
9
10
10
The following new features support the theme of better performance for safe code:
11
11
@@ -19,15 +19,14 @@ The following enhancements were made to existing features:
19
19
20
20
- You can test `==` and `!=` with tuple types.
21
21
- You can use expression variables in more locations.
22
-
- You may attach attributes to the backing field of autoimplemented properties.
22
+
- You may attach attributes to the backing field of auto-implemented properties.
23
23
- Method resolution when arguments differ by `in` has been improved.
24
-
- Overload resolution new has fewer ambiguous cases.
24
+
- Overload resolution now has fewer ambiguous cases.
25
25
26
26
The new compiler options are:
27
27
28
-
-`deterministic` to ensure that subsequent compilations of the same source generate the same binary output.
29
-
-`publicsign` to enable OSS signing of assemblies.
30
-
-`pathmap` to provide a mapping for source directories.
28
+
-`-publicsign` to enable OSS signing of assemblies.
29
+
-`-pathmap` to provide a mapping for source directories.
31
30
32
31
The remainder of this article provides details and links to learn more about each of the improvements.
33
32
@@ -82,6 +81,7 @@ Now, that same syntax can be applied to arrays that are declared with `stackallo
82
81
```csharp
83
82
int*pArr=stackallocint[3] {1, 2, 3};
84
83
int*pArr2=stackallocint[] { 1, 2, 3};
84
+
Span<int>arr=stackalloc [] {1, 2, 3};
85
85
```
86
86
87
87
You can learn more in the article on the [`stackalloc` statement](../language-reference/keywords/stackalloc.md).
@@ -106,7 +106,7 @@ The second theme provides improvements to features in the language. These featur
106
106
107
107
### Tuples support `==` and `!=`
108
108
109
-
The C# tuple types now support `==` and `!=`. You can learn more about the rules in the article on [tuples](../tuples.md).
109
+
The C# tuple types now support `==` and `!=`. You can learn more about the rules in the article on [tuples](../tuples.md#equality-and-tuples).
110
110
111
111
### Attach attributes to the backing fields for auto-implemented properties
112
112
@@ -128,7 +128,10 @@ static void M(S arg);
128
128
staticvoidM(inSarg);
129
129
```
130
130
131
-
Now, the by value (first in the preceding example) overload is better than the by readonly reference version. To specify that by readonly reference version, you must include the `in` modifier when calling the method.
131
+
Now, the by value (first in the preceding example) overload is better than the by readonly reference version. To specify the by readonly reference version is called, you must include the `in` modifier when calling the method.
132
+
133
+
> [!NOTE]
134
+
> This was implemented as a bug fix. This no longer is ambiguous even with the language version set to "7.2".
132
135
133
136
For more information, see the article on the [`in` parameter modifier](../language-reference/keywords/in-parameter-modifier.md).
134
137
@@ -168,22 +171,14 @@ You'll only notice this change because you'll find fewer compiler errors for amb
168
171
169
172
New compiler options support new build and DevOps scenarios for C# programs
170
173
171
-
### Deterministic compiler output
172
-
173
-
The `-deterministic` option instructs the compiler to produce a byte-for-byte identical output assembly for successive compilations of the same source files.
174
-
175
-
By default, every compilation unique output on each compilation. The compiler adds a timestamp, and a GUID generated from random numbers. You use this option if you want to compare the byte-for-byte output to ensure consistency across builds.
176
-
177
-
For more information, see the [deterministic compiler option](../language-reference/compiler-options/deterministic-compiler-option.md) article.
178
-
179
174
### Public or OSS signing
180
175
181
176
The `-publicsign` compiler option instructs the compiler to sign the assembly using a public key. The assembly is marked as signed, but the signature is taken from the public key. This option enables you to build signed assemblies from open-source projects using a public key.
182
177
183
-
For more information, see the [publicsign compiler option](../language-reference/compiler-options/publicsign-compiler-option.md) article.
178
+
For more information, see the [-publicsign compiler option](../language-reference/compiler-options/publicsign-compiler-option.md) article.
184
179
185
180
### pathmap
186
181
187
182
The `-pathmap` compiler option instructs the compiler to replace source paths from the build environment with mapped source paths. The pathmap option controls the source path written by the compiler to PDB files or for the <xref:System.Runtime.CompilerServices.CallerFilePathAttribute>.
188
183
189
-
For more information, see the [pathmap compiler option](../language-reference/compiler-options/pathmap-compile-option.md) article.
184
+
For more information, see the [-pathmap compiler option](../language-reference/compiler-options/pathmap-compile-option.md) article.
Copy file name to clipboardExpand all lines: docs/csharp/whats-new/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,9 @@ major features added in each release.
17
17
*[C# 7.3](csharp-7-3.md):
18
18
- This page describes the latest features in the C# language. C# 7.3 is currently available in [Visual Studio 2017 version 15.7](https://www.visualstudio.com/vs/whatsnew/), and in the [.NET Core 2.1 SDK Preview](../../core/whats-new/index.md).
19
19
*[C# 7.2](csharp-7-2.md):
20
-
- This page describes the latest features in the C# language. C# 7.2 is currently available in [Visual Studio 2017 version 15.5](https://www.visualstudio.com/vs/whatsnew/), and in the [.NET Core 2.0 SDK](../../core/whats-new/index.md).
20
+
- This page describes the features added in the C# language. C# 7.2 is currently available in [Visual Studio 2017 version 15.5](https://www.visualstudio.com/vs/whatsnew/), and in the [.NET Core 2.0 SDK](../../core/whats-new/index.md).
21
21
*[C# 7.1](csharp-7-1.md):
22
-
- This page describes the features in C# 7.1. These features were added in [Visual Studio 2017 version 15.3](https://www.visualstudio.com/vs/whatsnew/), and in the [.NET Core 2.0 SDK](../../core/whats-new/index.md).
22
+
- This page describes the features added in C# 7.1. These features were added in [Visual Studio 2017 version 15.3](https://www.visualstudio.com/vs/whatsnew/), and in the [.NET Core 2.0 SDK](../../core/whats-new/index.md).
23
23
*[C# 7.0](csharp-7.md):
24
24
- This page describes the features added in C# 7.0. These features were added in [Visual Studio 2017](https://www.visualstudio.com/vs/whatsnew/) and [.NET Core 1.0](../../core/whats-new/index.md) and later
0 commit comments