Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp8
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. var student = new Student();
  10. student.Walk();
  11.  
  12.  
  13. }
  14. }
  15. class Person
  16. {
  17. public void Walk()
  18. {
  19. Console.WriteLine("The person is walking");
  20. }
  21. }
  22. class Student : Person
  23. {
  24. public void Walk()
  25. {
  26. Console.WriteLine("The student is walking");
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement