using System; public class Test { interface ITest { } class ServiceBase { } class ServiceClient : ServiceBase { public string Data { get; set; } } static string GetFoo2() { return Execute((ServiceClient clnt) => clnt.Data); } static TResult Execute(Func fnc) where TService : ServiceBase /*, IDisposable*/, new() { return default(TResult); } public static void Main() { Test.GetFoo2(); } }