为什么会出现在我的抽象基类此编译错误? [英] Why am I getting this compilation error in my abstract base class?
本文介绍了为什么会出现在我的抽象基类此编译错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想延长这个插件是我自己用...
I'm trying to extend this plugin for my own use...
但是,当我到Visual Studio中的代码复制,我我收到的一些错误。
But when I copy the code over to Visual Studio, I'm am getting some error.
我是否需要输入一些特殊的框架,以使用' =>'运算符和调用方法?这是一个抽象基类。我使用VS2013
Do I need to import some special framework in order to use the '=>' operator and 'Invoke' Method? This is an abstract base class. I am using VS2013
推荐答案
?从C#6,和以及(用于表达健全成员时)=>操作符功能,仅在Visual Studio中2015年之前。
?. is a feature from C# 6, and as well as the => operator (when used for expression-bodied members), is available in Visual Studio 2015 only.
Read about them here null-conditional operators and here => operator
C#< 6语法:
C# < 6 syntax:
protected virtual void OnConnectivityChanged(ConnectivityChangedEventArgs e)
{
if (ConnectivityChanged != null)
ConnectivityChanged.Invoke(this, e);
}
这篇关于为什么会出现在我的抽象基类此编译错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文