hi,
m trying to create an extension method in .net 2.0. Extension methods are supported in 3.5 but when i searched in google i got the below code.
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Method)]
public sealed class ExtensionAttribute : Attribute
{
public ExtensionAttribute() { }
}
}
In many sites its given that if we add the below code to 2.0 also the extension method will work. but still m getting error some thing like this
Cannot define a new extension method
because the compiler required type
'System.Runtime.CompilerServices.ExtensionAttribute' cannot be found.
Are you missing a reference to System.Core.dll?
please any one help me.
thanx