0

I am trying to write a class in C# with [Serializable()] mark. Then I noticed that there are some situations the NonSerializedAttribute mark is needed.

I am curious about when should I use [NonSerializedAttribute()] in other conditions besides these rules?

Any comments or suggestions are welcome.

JimmyHu
  • 403
  • 1
  • 8
  • 20
  • 4
    When you don't want something `serialized`, you will know when you need it – TheGeneral Sep 07 '20 at 05:50
  • "Indicates that a field of a serializable class should not be serialized". So, whenever something should not be serialized (e.g. instance specific data) – Biesi Sep 07 '20 at 05:50

0 Answers0