Guest User

Untitled

a guest
Apr 16th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. c1 c;
  13. c2 cc = new c2();
  14. c2 ccc = new c2(10);
  15.  
  16. Console.WriteLine(cc.v);
  17. Console.WriteLine(ccc.v);
  18.  
  19. }
  20. class c1
  21. {
  22. public int v;
  23. public c1()
  24. {
  25. v = 0;
  26. }
  27. public c1(int x)
  28. {
  29. v = x;
  30. }
  31. }
  32. class c2 : c1
  33. {
  34.  
  35. }
  36. }
  37. }
Add Comment
Please, Sign In to add comment