fork(1) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. interface ITest
  6. {
  7. }
  8.  
  9. class ServiceBase<T>
  10. {
  11. }
  12.  
  13. class ServiceClient : ServiceBase<ITest>
  14. {
  15. public string Data { get; set; }
  16. }
  17.  
  18. static string GetFoo2() {
  19. return Execute<ServiceClient, ITest, string>((ServiceClient clnt) => clnt.Data);
  20. }
  21.  
  22. static TResult Execute<TService, TInterface, TResult>(Func<TService, TResult> fnc)
  23. where TService : ServiceBase<TInterface> /*, IDisposable*/, new()
  24. {
  25. return default(TResult);
  26. }
  27.  
  28. public static void Main()
  29. {
  30. Test.GetFoo2();
  31. }
  32. }
Success #stdin #stdout 0.01s 130944KB
stdin
Standard input is empty
stdout
Standard output is empty