Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / class / System.Configuration / System.Configuration / CommaDelimitedStringCollectionConverter.cs
index f2e9c01178577323bbc7e121136cb54a4c029243..52824cbd0d07c518dc2d8cb6865233ac9fb0fe35 100644 (file)
@@ -26,8 +26,7 @@
 // Copyright (C) 2005 Novell, Inc (http://www.novell.com)
 //
 
-#if NET_2_0
-
+using System.Collections.Specialized;
 using System.ComponentModel;
 using System.Globalization;
 
@@ -47,6 +46,7 @@ namespace System.Configuration
                        foreach (string datum in datums)
                                col.Add (datum.Trim());
 
+                       col.UpdateStringHash ();
                        return col;
                }
 
@@ -54,11 +54,11 @@ namespace System.Configuration
                {
                        if (value == null) return null;
 
-                       if (value.GetType() != typeof (CommaDelimitedStringCollection))
+                       if (!typeof (StringCollection).IsAssignableFrom (value.GetType()))
                                throw new ArgumentException ();
 
                        return value.ToString ();
                }
        }
 }
-#endif
+