fork(3) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5.  
  6. class Base {}
  7. class Derived: Base {}
  8. class D: Derived{}
  9.  
  10. public static void Main()
  11. {
  12. Console.WriteLine(typeof(Base).IsAssignableFrom(typeof(D)));
  13. Console.WriteLine(typeof(D).IsSubclassOf (typeof(Base)));
  14. }
  15. }
Success #stdin #stdout 0s 29664KB
stdin
Standard input is empty
stdout
True
True