Posted 4 years ago
by Marc Beeson
-
Precision Mining
Version: 20.1.0400
Platform: .NET 4.6
Environment: Windows 10 (64-bit)
![Avatar](https://secure.gravatar.com/avatar/898558f5f59845006791a81becefe3ad.jpg?s=64&d=identicon&r=g)
Using the C# Editor sample in the .Net Languages Add-on Demos of the Sample Browser app. If I use the following code snippet the line with '(a ?? "").Trim();' gets picked up as an error. However wrapping the null coalescing statement in another parenthesis group clears the error.
string a = null;
Console.WriteLine((a ?? "").ToString());
(a ?? "").Trim();
((a ?? "")).Trim();
The code snippet is redundant, but highlights the issue.
[Modified 4 years ago]