相关疑难解决方法(0)

C# - “is”运算符后面的大括号的含义

我在一些 C# 源代码中发现了以下行:

if(!(context.Compilation.GetTypeByMetadataName("Xunit.FactAttribute") is { } factAttribute))

这是另一个:

if(!(diagnostic.Location.SourceTree is { } tree))

运算符{ }后面的花括号 ( )是什么意思is

c# curly-braces operator-keyword

7
推荐指数
1
解决办法
434
查看次数

标签 统计

c# ×1

curly-braces ×1

operator-keyword ×1