[Mono-bugs] [Bug 82515][Maj] New - During creation of reference types (tested with StringCollection) application settings base either throws errors and did not create reference type.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Aug 21 08:04:47 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by murphino at fastmail.fm.

http://bugzilla.ximian.com/show_bug.cgi?id=82515

--- shadow/82515	2007-08-21 08:04:47.000000000 -0400
+++ shadow/82515.tmp.26480	2007-08-21 08:04:47.000000000 -0400
@@ -0,0 +1,68 @@
+Bug#: 82515
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: All
+Status: NEW   
+Resolution: 
+Severity: 002 Two hours
+Priority: Major
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: murphino at fastmail.fm               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: During creation of reference types (tested with StringCollection) application settings base either throws errors and did not create reference type.
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+With code like this:
+
+public sealed partial class HistoryKeeperSettings :
+global::System.Configuration.ApplicationSettingsBase {
+
+    private static HistoryKeeperSettings defaultInstance =
+((HistoryKeeperSettings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new
+HistoryKeeperSettings())));
+
+    public static HistoryKeeperSettings Default {get {return defaultInstance;}}
+
+    public static class SettingKey {
+    public const string RecentDocumentsList = "RecentDocumentsList";
+    }
+
+    [global::System.Configuration.UserScopedSettingAttribute()]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    public System.Collections.Specialized.StringCollection RecentDocumentsList
+    {
+         get { return
+((System.Collections.Specialized.StringCollection)(this["RecentDocumentsList"]));}
+         set { this["RecentDocumentsList"] = value;}
+    }
+    }
+
+ApplicationSettingsBase has different result than Microsoft .NET Framework
+- RecentDocumentsList will return null.
+
+Steps to reproduce the problem:
+1. 
+2. 
+3. 
+
+Actual Results:
+
+null
+
+Expected Results:
+
+new instance of StringCollection.
+
+How often does this happen? 
+
+Everytime.
+
+Additional Information:


More information about the mono-bugs mailing list