fork download
  1. using System;
  2.  
  3. public interface IExtension
  4. {
  5. public static int Multiple(this int a)
  6. {
  7. return a * 2;
  8. }
  9. }
  10.  
  11. public class Test
  12. {
  13. public static void Main()
  14. {
  15. // your code goes here
  16. }
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(5,22): error CS0106: The modifier `public' is not valid for this item
prog.cs(5,22): error CS0106: The modifier `static' is not valid for this item
prog.cs(5,22): error CS0531: `IExtension.Multiple(this int)': interface members cannot have a definition
Compilation failed: 3 error(s), 0 warnings
stdout
Standard output is empty