fork(1) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. // your code goes here
  8. }
  9. }
  10.  
  11. namespace A
  12. {
  13.  
  14. public abstract class BaseClass
  15. {
  16. protected virtual string GetData()
  17. {
  18. throw new NotImplementedException();
  19. }
  20. }
  21. }
  22.  
  23. namespace B //includes a reference to A
  24. {
  25. abstract class DerivedClassA : A.BaseClass
  26. {
  27.  
  28. }
  29.  
  30.  
  31. internal class DerivedClassB: DerivedClassA
  32. {
  33. public void write()
  34. {
  35. base.GetData(); // results in error.
  36.  
  37. // The name 'GetData' does not exist in the current context
  38. // and DerivedClassA does not contain a definition for 'GetData'
  39. }
  40. }
  41. }
Success #stdin #stdout 0.01s 33528KB
stdin
Standard input is empty
stdout
Standard output is empty