Wednesday, March 13, 2013

cannot convert from 'ref blah' to 'ref object'



this doesnt compile:
private void changeRef(ref object o)
        {
            o = new GCNotificationStatus();

        }
        private void change(object o)
        {
            o = new GCNotificationStatus();

        }

        protected void Button14_Click(object sender, EventArgs e)
        {
            TaiwanCalendar t = new TaiwanCalendar();
            changeRef(ref t);
            change(t);
        }

the reason

No comments:

Post a Comment