2010-07-06 Gonzalo Paniagua Javier <gonzalo@novell.com>
[mono.git] / mcs / class / System.Configuration / System.Configuration / PropertyInformation.cs
index 823945045d5ab5a30890d192d4fcce84f5b800bb..9d5662712ad43512cf778ba1b32dac945dde0d04 100644 (file)
@@ -39,9 +39,8 @@ namespace System.Configuration
                string source;
                object val;
                PropertyValueOrigin origin;
-               ConfigurationElement owner;
-               
-               ConfigurationProperty property;
+               readonly ConfigurationElement owner;
+               readonly ConfigurationProperty property;
                
                internal PropertyInformation (ConfigurationElement owner, ConfigurationProperty property)
                {
@@ -108,7 +107,7 @@ namespace System.Configuration
                        get {
                                if (origin == PropertyValueOrigin.Default) {
                                        if (property.IsElement) {
-                                               ConfigurationElement elem = (ConfigurationElement) Activator.CreateInstance (Type);
+                                               ConfigurationElement elem = (ConfigurationElement) Activator.CreateInstance (Type, true);
                                                elem.InitFromProperty (this);
                                                if (owner != null && owner.IsReadOnly ())
                                                        elem.SetReadOnly ();