fork download
  1. using System;
  2. public class Message{
  3. public int id {get;set;}
  4. //a lot of properties here
  5. public void print(){
  6. Console.WriteLine("id is " + id );
  7.  
  8. //a lot of write lines here
  9. }
  10. }
  11.  
  12. public class Comment : Message{
  13. public int parent_id {get;set;}
  14. //a lot of properties here
  15. public void print(){
  16. //???
  17. }
  18. }
  19. public class Test
  20. {
  21. public static void Main()
  22. {
  23. // your code goes here
  24. Message a = new Message();
  25. a.id = 10;
  26. a.print();
  27. }
  28. }
Success #stdin #stdout 0.04s 23944KB
stdin
Standard input is empty
stdout
id is 10