开发者

Add Extension Method to Service

I am using Tuple class in WCF Service. When i add reference to my web project I get Tuple class. Now i want to add an extension method to Tuple<> class in my service which will be accessible in my Web project. Can it be ach开发者_如何学Goieved?


Pointless example that should highlight the point:

namespace Extensions
{
  public static class TupleExtensions
  {
    public static bool IsNull<T1, T2>(this Tuple<T1, T2> t)
      where T1 : class
      where T2 : class
    {
      return t.Item1 == null && t.Item2 == null;
    }
  }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜