Serializing this class works fine. However, sometimes I'd like to exclude the field. Is this possible?
[DataContract]
class Foo
{
[DataMember]
Foo _Foo;
}
Setting the field to null temporarily is impossible.
Serializing this class works fine. However, sometimes I'd like to exclude the field. Is this possible?
[DataContract]
class Foo
{
[DataMember]
Foo _Foo;
}
Setting the field to null temporarily is impossible.
Copyright © 2021 Jogjafile Inc.
In case someone stumbles upon the same issue, I'll show the solution I went by.
The idea is to facade the original field like this: