fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. IText h2 = new HtmlTextBox2{Text="Hello world"};
  8. Console.WriteLine(h2.Text);
  9. }
  10. }
  11.  
  12. public class HtmlTextBox
  13. {
  14. public string Text {get; set;}
  15. }
  16.  
  17. public class HtmlDiv
  18. {
  19. public string Text {get; set;}
  20. }
  21.  
  22. public interface IText
  23. {
  24. string Text {get; }
  25. }
  26.  
  27. public class HtmlTextBox2 : HtmlTextBox, IText {}
  28. public class HtmlDiv2 : HtmlDiv, IText {}
  29.  
  30.  
  31.  
Success #stdin #stdout 0.02s 33832KB
stdin
Standard input is empty
stdout
Hello world