fork download
  1. using System;
  2. class csrefKeywordsOperators
  3. {
  4. class Base
  5. {
  6. public override string ToString()
  7. {
  8. return "Base";
  9. }
  10. }
  11. class Derived : Base
  12. { }
  13.  
  14. class Program
  15. {
  16. static void Main()
  17. {
  18.  
  19. Derived d = new Derived();
  20.  
  21. Base b = d as Base;
  22. if (b != null)
  23. {
  24. Console.WriteLine(b.ToString());
  25. }
  26.  
  27. }
  28. }
  29. }
Success #stdin #stdout 0.03s 23868KB
stdin
Standard input is empty
stdout
Base