nonserializedattribute Questions
5
Solved
I can't find "field" listed as a C# keyword anywhere. Does anyone know the background on this?
Dorrie asked 7/1, 2010 at 16:57
3
Solved
[Serializable]
class MyClass
{
[NonSerialized] int Foo { get; set; } // error
[NonSerialized] int bar; // ok
}
Why is this disallowed?
I know about the workarounds such as
implementing ISeri...
Formation asked 21/9, 2010 at 13:40
1
Solved
How do you specify a NonSerialized field with public accessors for XML Serialization?
[NonSerialized]
public String _fooBar;
//Declaring the property here will serialize the _fooBar field
public S...
Verve asked 6/4, 2011 at 1:28
5
Solved
I'm looking through some existing code in a project I'm working on, and I found a class that is implemented as:
public class ThingOne
{
private int A;
private int B;
[NonSerialized]
private ...
Cru asked 17/9, 2010 at 13:56
2
Solved
I came across this question on transcender:
What should you apply to a field if its value is not required during deserialization?
Me = [NonSerialized], ANSWER = [OptionalField]
My gut reaction w...
Proto asked 6/4, 2010 at 16:26
1
© 2022 - 2024 — McMap. All rights reserved.