can anyone tell why the compiler is throwing the warning even if i checked everthing for null??
// check if non default accent color is selected
var accCol = await LocalSorage.GetItemAsync<string>("accentColor");
if (!String.IsNullOrEmpty(accCol) && aColors!=null && aColors.accentColorsList!=null && aColors.accentColorsList.Count()>0)
{
AccentColors res = aColors.accentColorsList.Find(x => x.ColorValue == accCol);
if(res!=null) {
this.selOption = res;
}
this.mAccentBaseColor = accCol;
}
VsCode is throwing the following warning over the linq query: onverting null literal or possible null value to non-nullable type.Roslyn CS8600
As i am not allowed to post a screenshot of the warning, the warning is throwed for this line:
AccentColors res = aColors.accentColorsList.Find(x => x.ColorValue == accCol);