fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8. static class ExtendMethods
  9. {
  10. public static void P(this string input)
  11. {
  12. Console.WriteLine(input);
  13. }
  14. }
  15.  
  16. class Program
  17. {
  18. static void Main(string[] args)
  19. {
  20.  
  21. "mojiretu".P();
  22.  
  23. string s = "ExtendMethods Test";
  24. s.P();
  25. }
  26. }
  27. }
  28.  
Success #stdin #stdout 0.03s 36912KB
stdin
Standard input is empty
stdout
mojiretu
ExtendMethods Test