Thursday, May 8, 2014

Readonly on reference types

    public class testReadonly
    {
        public  readonly List<string> l = new List<string>();  
    }
    

     testReadonly tr = new testReadonly();

            tr.l.Add("fdgdgf"); 


this is ok because of this

No comments:

Post a Comment