此代码在vs2013中给出了错误...
我现在不知道为什么......有人可以帮助我吗?
我的问题是我不知道#blacksection
的含义以及如何解决错误
=>
答案 0 :(得分:6)
在这种情况下,=>
表示表达身体成员,相当于:
public static void Fatal(this ILogger l, Func<string> msgFactory)
{
return FilteredLog(l, LogLevel.Fatal, null, msgFactory);
}
但是,这种语法是在C#6中引入的,它需要Visual Studio 2015编译器或更新版本。切换到方法语法或升级您的Visual Studio版本。