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

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJb Evain <jbevain@gmail.com>2014-11-02 16:45:29 +0300
committerJb Evain <jbevain@gmail.com>2014-11-02 16:45:29 +0300
commitdaa7a65c52ea697d9cc85fd5394f62309fff6443 (patch)
tree6f510a64b9e7b4a5f36980ec3850773f579c8d05 /Mono.Collections.Generic
parent41f3bc703931e782ac87576062ec3938aa8a01c2 (diff)
Use existing resize extension method
Diffstat (limited to 'Mono.Collections.Generic')
-rw-r--r--Mono.Collections.Generic/Collection.cs10
1 files changed, 3 insertions, 7 deletions
diff --git a/Mono.Collections.Generic/Collection.cs b/Mono.Collections.Generic/Collection.cs
index ff71283..d619962 100644
--- a/Mono.Collections.Generic/Collection.cs
+++ b/Mono.Collections.Generic/Collection.cs
@@ -30,6 +30,8 @@ using System;
using System.Collections;
using System.Collections.Generic;
+using Mono.Cecil;
+
namespace Mono.Collections.Generic {
public class Collection<T> : IList<T>, IList {
@@ -279,13 +281,7 @@ namespace Mono.Collections.Generic {
if (new_size < size)
throw new ArgumentOutOfRangeException ();
-#if !CF
- Array.Resize (ref items, new_size);
-#else
- var array = new T [new_size];
- Array.Copy (items, array, size);
- items = array;
-#endif
+ items = items.Resize (new_size);
}
int IList.Add (object value)