星期五, 6月 13, 2008

[C#] Using Extension Methods in .net framework 2.0



在.net framework 2.0 or 3.0 沒辦法Compile Extension Method怎麼辦?

很簡單 在幾行code就可以了

namespace System.Runtime.CompilerServices
{
public class ExtensionAttribute : Attribute { }
}

方法是從下面的blog來的


The Moth: Using Extension methods in Fx 2.0 projects

沒有留言: