indigo
indigo
CC#
Created by Aart Bluestoke on 5/2/2023 in #help
❔ how to supress warning CS8774
There have been some proposals brought up before https://github.com/dotnet/csharplang/discussions/5657 https://github.com/dotnet/csharplang/issues/6888 Not sure how far it's gotten since then though
18 replies
CC#
Created by Cinthia on 5/2/2023 in #help
❔ Change Null Values
E.g.
class MyAwesomeClass
{
const string NA = "N/A";
string? _awesome;

public string AwesomeString => _awesome ?? NA;

public MyAwesomeClass(string? awesome) => _awesome = awesome;
}
class MyAwesomeClass
{
const string NA = "N/A";
string? _awesome;

public string AwesomeString => _awesome ?? NA;

public MyAwesomeClass(string? awesome) => _awesome = awesome;
}
38 replies
CC#
Created by Cinthia on 5/2/2023 in #help
❔ Change Null Values
They might be looking to separate the value from the display, so that you could still assign null to the backing field.
38 replies