In .NET, instances of a type like the following will serialize/deserialize without a problem.
[DataContract]
public class SampleType {
private List<String> _myStrings;
public SampleType() {}
[DataMember]
public string Name { get; set; }
[DataMember]
public List<String> Strings {
get {
if (_myStrings == null) _myStrings = new List<string>();
return _myStrings;
}
}
}
In Xamarin.Android, the lack of a setter on the "Strings" data member causes an InvalidOperationException: Failed to set value of type System.Collections.Generic.List'1[System.String] for property System.Collections.Generic.List'1[System.String] Strings"
According to MS documentation, .NET collections are deserialized by calling their Add method ^, and the setter is not used or required.