C
C#4w ago
Fattouh

Are internal properties deserializable?

I noticed I can't deserialize a class with internal properties. I tried a bunch of work-around solutions, but they didn’t work out. Once I declare the properties public, it just works.
No description
No description
5 Replies
Fattouh
FattouhOP4w ago
[JsonInclude] solved the case. Gotta dig deeper to know how this exactly works behind the scenes. Thanks!
asdf
asdf4w ago
Is there a reason to declare properties internal if the class is already internal
Petris
Petris4w ago
I (and other people I've talked with about this) usually follow this: always specify visibilities on members as if the type was public that way you don';t need to change anything if the type becomes public and such
Unknown User
Unknown User4w ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?