Hello,

This should not be happening. Did you try Jeff's suggestion to change
your project "Linker behaviour" option ?

If you did and this did not help could you create a test case and fill
a bug report on http://bugzilla.xamarin so we can have a look at this
? I'd really like to know what's going on and ensure it gets fixed
asap.

Thanks!
Sebastien

On Tue, Nov 8, 2011 at 7:58 PM, sisnaz <[email protected]> wrote:
> Thank you for the tips Dino!! I finally got a workaround in place and
> working. The Preserve attribute gave me big hopes, but still couldn't get it
> to work while I had the [Serializable] attribute. Here is what I did:
>
> - I left my existing model without the [Serializable] attribute. It now has
> [Preserve (AllMembers = true)]
>
> - I create a new class with the exact same signature, called it "People" and
> decorated it with [Serializable].
>
> [Serializable]
> public class People {
>  string _description;
>  string _firstName;
>  string _lastName;
>
>  public string Description {
>  get { return _description; }
>  set { _description = value; }
>  }
>
>  public string FirstName {
>  get { return _firstName; }
>  set { _firstName = value; }
>  }
>
>  public string LastName {
>  get { return _lastName; }
>  set { _lastName = value; }
>  }
>
> }
>
> Next when I'm ready to persist to the file I iterate the PeopleModel list
> inside a foreach, create a new class from the serializable and add it to a
> new list.
>
> List<People> peopleList = new List<People>();
> foreach (PeopleModel item in persons) {
>  People people = new People {
>   Description = item.Description,
>   LastName = item.LastName,
>   FirstName = item.FirstName
>  };
>  peopleList.Add(people);
> }
>
> ... and then reverse the process when I serialize it from the binary file.
>
> Sure would be nice to know what the issue is (or was), but at least it's
> working and I can move on to the next frustration
>
> Thanks again for the tips.
>
> -----
> There was only 1 trilogy
> --
> View this message in context: 
> http://monotouch.2284126.n4.nabble.com/the-requested-operation-cannot-be-completed-because-tp4017899p4018216.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to