passing collection to AddRange method on itself.
* CodeTypeReferenceCollection.cs: same.
* CodeParameterDeclarationExpressionCollection.cs: same.
* CodeStatementCollection.cs: same.
svn path=/trunk/mcs/; revision=52725
+2005-11-08 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * CodeExpressionCollection.cs: Fixed OutOfMemoryException when
+ passing collection to AddRange method on itself.
+ * CodeTypeReferenceCollection.cs: same.
+ * CodeParameterDeclarationExpressionCollection.cs: same.
+ * CodeStatementCollection.cs: same.
+
2005-11-04 Gert Driesen <drieseng@users.sourceforge.net>
* CodeEventReferenceExpression.cs: EventName now returns zero-length
throw new ArgumentNullException ("value");
}
- for (int i = 0; i < value.Count; i++) {
+ int count = value.Count;
+ for (int i = 0; i < count; i++) {
Add (value[i]);
}
}
throw new ArgumentNullException ("value");
}
- for (int i = 0; i < value.Count; i++) {
+ int count = value.Count;
+ for (int i = 0; i < count; i++) {
Add (value[i]);
}
}
throw new ArgumentNullException ("value");
}
- for (int i = 0; i < value.Count; i++) {
+ int count = value.Count;
+ for (int i = 0; i < count; i++) {
Add (value[i]);
}
}
throw new ArgumentNullException ("value");
}
- for (int i = 0; i < value.Count; i++) {
+ int count = value.Count;
+ for (int i = 0; i < count; i++) {
Add (value[i]);
}
}