This question is specific for the case of get; set in properties.
Here is the code that I have:
public abstract partial class BaseViewModel : ObservableObject
{
string? title = string.Empty;
/// <summary>
/// Gets or sets the title.
/// </summary>
/// <value>The title.</value>
public string? Title
{
get => title;
set => SetProperty(ref title, value);
}
I understand there is a lot of information out there on the fact that a warning message is now issued for nullable reference properties and in this case the warning appears under the ?
in the above code.
CS8632: The annotation for nullable reference types should only be used in code with a #nullable annotation context
However can someone tell me if this should be a concern for this particular case and if it's something I can supress for properties or should I change the way my property backing field is defined?