Skip to content

Conversation

@valorieschwartzdev
Copy link

  • Include update to NetSerializer test

* Include update to NetSerializer test
@RevenantX
Copy link
Owner

@BassaForte you can use field instead of property and it will be ignored. Why not use that way?

@valorieschwartzdev
Copy link
Author

@BassaForte you can use field instead of property and it will be ignored. Why not use that way?

  1. Attribute usage is more obvious, easier to read (also, I was not aware that fields are automatically ignored, even after scouring the docs - doesn't seem user friendly).

  2. It's more akin to other data annotation (ex. System.Runtime.Serialization.DataMemberAttribute and IgnoreDataMemberAttribute).

  3. Coding standards. That's not exactly how fields are intended to be used, anyway, and I should be able to decide which properties are serialized or not.

@RevenantX RevenantX merged commit 540cb65 into RevenantX:master Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants