Created
December 1, 2015 18:43
-
-
Save rje/aae9f179397449f3eed9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class A | |
{ | |
public int Foo = 1; | |
} | |
public class B : A | |
{ | |
public int Bar = 2; | |
} | |
public class C : A | |
{ | |
public int Baz = 3; | |
} | |
public class ToSerialize { | |
public List<A> MyList; | |
public ToSerialize() { | |
MyList = new List<A>(); | |
MyList.Add(new B()); | |
MyList.Add(new C()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment