[mono-android] Being driven insane....

José M. Rivera jmro20 at hotmail.com
Tue Nov 29 15:00:38 EST 2011


I got around this problem by adding a constructor with no parameters to my
class. Now it's working perfect.

This is working for me:

    [Serializable]
    public class MyClass
    {
        #region "Global Variables"

        private string mGender;
        private bool mSmoker;
        private DateTime mDOB;

        #endregion

        #region "Constructors"

        public Person(string Gender, bool Smoker, DateTime DateOfBirth)
        {
            mGender = Gender;
            mSmoker = Smoker;
            mDOB = DateOfBirth;
        }

        public Person()
        {
        }

        #endregion

        #region "Properties"
       
        public string Gender
        {
            get { return mGender; }
            set { mGender = value; }
        }

        public bool Smoker
        {
            get { return mSmoker; }
            set { mSmoker = value; }
        }

        public DateTime DOB
        {
            get { return mDOB; }
            set { mDOB = value; }
        }
      
        #endregion   
    }

--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/Being-driven-insane-tp5016975p5033498.html
Sent from the Mono for Android mailing list archive at Nabble.com.


More information about the Monodroid mailing list