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

有帮助吗?

解决方案

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:

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top