Created
September 15, 2021 16:14
-
-
Save configureappio/0368d42f08b9f3b1dc3abe89d31f6446 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public class C { | |
public void M(string value) | |
{ | |
if (value is null!) throw new ArgumentNullException(nameof(value)); | |
// works in NET 5 (C#9) but fails in 6 RC1 (C#10) with error CS8598: The suppression operator is not allowed in this context | |
// I can see why as the null does not need a null foriving as string is not a declared string? | |
// so it is correct to flag as a code smell, but should the error CS8598 be an error or a warning when migrating NET5 code? | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Diagnostics; | |
using System.Reflection; | |
using System.Runtime.CompilerServices; | |
using System.Security; | |
using System.Security.Permissions; | |
[assembly: CompilationRelaxations(8)] | |
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] | |
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] | |
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] | |
[assembly: AssemblyVersion("0.0.0.0")] | |
[module: UnverifiableCode] | |
public class C | |
{ | |
public void M(string value) | |
{ | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": 1, | |
"target": "C#", | |
"mode": "Debug", | |
"branch": "main" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment