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;
}
}
}
精彩评论