Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stodden <stodden@mono-cvs.ximian.com>2002-11-07 00:23:18 +0300
committerDaniel Stodden <stodden@mono-cvs.ximian.com>2002-11-07 00:23:18 +0300
commitae48010ffe5ca2ebfc7d66261495dd5147c9f62c (patch)
treeb206bfe9ff270a0a6e0f101be134b077d134b2f7 /mcs/class/System/System.Collections.Specialized
parent846b19aadda8afa22e29eea2fd24c2e53a3704b2 (diff)
* ListDictionary.cs:
- Filled in missing CopyTo()s. - No, overwriting an entry should not change the Count <:) svn path=/trunk/mcs/; revision=8858
Diffstat (limited to 'mcs/class/System/System.Collections.Specialized')
-rwxr-xr-xmcs/class/System/System.Collections.Specialized/ChangeLog6
-rw-r--r--mcs/class/System/System.Collections.Specialized/ListDictionary.cs30
2 files changed, 18 insertions, 18 deletions
diff --git a/mcs/class/System/System.Collections.Specialized/ChangeLog b/mcs/class/System/System.Collections.Specialized/ChangeLog
index c8983364b21..15179a7128a 100755
--- a/mcs/class/System/System.Collections.Specialized/ChangeLog
+++ b/mcs/class/System/System.Collections.Specialized/ChangeLog
@@ -1,3 +1,9 @@
+2002-11-06 Daniel Stodden <stodden@in.tum.de>
+
+ * ListDictionary.cs:
+ - Filled in missing CopyTo()s.
+ - No, overwriting an entry should not change the Count <:)
+
2002-10-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* NameValueCollection.cs: fixed Add (NameValueCollection).
diff --git a/mcs/class/System/System.Collections.Specialized/ListDictionary.cs b/mcs/class/System/System.Collections.Specialized/ListDictionary.cs
index 0ad664e3a1c..40e6cb67581 100644
--- a/mcs/class/System/System.Collections.Specialized/ListDictionary.cs
+++ b/mcs/class/System/System.Collections.Specialized/ListDictionary.cs
@@ -101,31 +101,29 @@ namespace System.Collections.Specialized
}
// ICollection Interface
- public int Count
- {
+ public int Count {
get {
return count;
}
}
- public bool IsSynchronized
- {
+ public bool IsSynchronized {
get {
return false;
}
}
- public object SyncRoot
- {
+ public object SyncRoot {
get {
return this;
}
}
- [MonoTODO]
public void CopyTo(Array array, int index)
{
- // FIXME
+ int i = index;
+ foreach ( DictionaryEntry entry in this )
+ array.SetValue( entry, i++ );
}
// IDictionary Interface
@@ -153,14 +151,10 @@ namespace System.Collections.Specialized
set {
ListEntry entry = FindEntry(key);
-
- if (entry != null) {
+ if (entry != null)
entry.value = value;
- count++;
- modCount++;
- } else {
+ else
AddImpl(key, value);
- }
}
}
@@ -336,8 +330,7 @@ namespace System.Collections.Specialized
}
// ICollection Interface
- public int Count
- {
+ public int Count {
get {
return dict.Count;
}
@@ -357,10 +350,11 @@ namespace System.Collections.Specialized
}
}
- [MonoTODO]
public void CopyTo(Array array, int index)
{
- // FIXME
+ int i = index;
+ foreach ( object obj in this )
+ array.SetValue( obj, i++ );
}
// IEnumerable Interface