I found in some C# source code the following line:
if(!(context.Compilation.GetTypeByMetadataName("Xunit.FactAttribute") is { } factAttribute))
and here is another one:
if(!(diagnostic.Location.SourceTree is { } tree))
What is the meaning of the curly braces ({ }
) after the is
operator?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…