code_junkie

Serializable Inheritance

Nov 11th, 2011
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4. static void Main()
  5. {
  6. Console.WriteLine(typeof(Foo).IsSerializable); // shows True
  7. Console.WriteLine(typeof(Bar).IsSerializable); // shows False
  8. }
  9. }
  10. [Serializable]
  11. class Foo {}
  12. class Bar : Foo {}
Add Comment
Please, Sign In to add comment