Guest User

Untitled

a guest
Jan 12th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. public class MyParentClass {
  2. public int MyInt { get; set; }
  3. }
  4.  
  5. public class MyChildClass : MyParentClass
  6. {
  7. }
  8.  
  9. public class AnotherClass
  10. {
  11. public MyChildClass GetChildClassFromParentClass(MyParentClass parent)
  12. {
  13. return new MyChildClass() { MyInt = parent.MyInt };
  14. }
  15. }
Add Comment
Please, Sign In to add comment