SHARE
TWEET

C# compiler issue "failed to emit module"

k0st1x Mar 12th, 2018 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     class Program {
  2.         static void Main() {
  3.             IServiceProvider provider = null;
  4.             DoWork(provider.GetService<>());
  5.         }
  6.  
  7.         static void DoWork(IDisposable service) {
  8.         }
  9.     }
  10.  
  11.     static class Extension {
  12.         public static T GetService<T>(this IServiceProvider provider) {
  13.             return default(T);
  14.         }
  15.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top