Advertisement
Guest User

Untitled

a guest
May 23rd, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.32 KB | None | 0 0
  1.     public class A<T>
  2.     {
  3.         public int Id { get; set; }
  4.         public List<T> Children { get; set; }
  5.         public A()
  6.         {
  7.             Children = new List<T>();
  8.         }
  9.     }
  10.  
  11.     public class B : A<B>
  12.     {
  13.         public B()
  14.         {
  15.             Children = new List<B>();
  16.         }
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement