mono .NET2.0 如何支持扩展方法

showjim 2014-05-17 06:48:04
vs2010选择.NET2.0只需要添加一个Attribute就可以了
namespace System.Runtime.CompilerServices
{
/// <summary>
/// 编译器扩展方法支持
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)]
public sealed class ExtensionAttribute : Attribute { }
}
MonoDevelop要选择.NET3.5(我没有试3.0)才能使用扩展方法,有哪位同学知道的话,麻烦指点一下,谢谢?
...全文
176 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
showjim 2014-05-23
  • 打赏
  • 举报
回复
引用 1 楼 q107770540 的回复:
Sounds like you need to install smcs (sudo apt-get install mono-smcs)
谢谢,不考虑mono .NET2.0了。
q107770540 2014-05-17
  • 打赏
  • 举报
回复
Sounds like you need to install smcs (sudo apt-get install mono-smcs)

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧