fork(1) download
  1. using System;
  2.  
  3. public interface IRead
  4. {
  5. float this[string name] { get; }
  6. }
  7.  
  8. public interface IWrite
  9. {
  10. float this[string name] { set; }
  11. }
  12.  
  13. public class Impl : IRead, IWrite
  14. {
  15. public float this[string name]
  16. {
  17. get { return 0; }
  18. set { }
  19. }
  20. }
  21.  
  22. public class Test
  23. {
  24. public static void Main()
  25. {
  26. Impl impl = new Impl();
  27. impl["test"] = 42;
  28. float x = impl["test"];
  29. }
  30. }
Success #stdin #stdout 0s 131264KB
stdin
Standard input is empty
stdout
Standard output is empty