سؤال

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