Hi,
Is it possible to use extension methods in C# using .NET 2 ?
I'm using Visual Studio 2013.
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Debendra DashPosted Jun 24, 2015, 11:11 AM
Sujeet SumanPosted Jun 24, 2015, 3:47 AM
Jaipal ReddyPosted Jun 24, 2015, 3:15 AM
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class |
AttributeTargets.Method)]
public sealed class ExtensionAttribute : Attribute { }
}
With this in place, extension methods will work in .NET 2.0 with C# 3.0.
Upendra Pratap ShahiPosted Jun 24, 2015, 3:11 AM
Manoj BhoirPosted Jun 24, 2015, 2:56 AM