Question

I was looking for something like this:

...
public string FirstName { get; set; }
public string LastName { get; set; }

[Ignore]
public string FullName { get { return FirstName + " " + LastName; } }
...

But, can't seem to dig anything up.

Environment: Xamarin Studio, C#, Android Project running on Mac

Était-ce utile?

La solution

This is dependant on which serializer you are using:

I can't answer with certainty what attribute should be used when you use XmlSerializer but I would suspect it should be either [NonSerialized], [ScriptIgnore] or [XmlIgnore].

Documentation:

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top