// Daniel Stodden (stodden@in.tum.de)
//
// (C) 2001 Ximian, Inc.
-//
-
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
public void AddRange (CodeCommentStatement [] value )
{
- foreach ( CodeCommentStatement elem in value )
- Add( elem );
+ if (value == null) {
+ throw new ArgumentNullException ("value");
+ }
+
+ for (int i = 0; i < value.Length; i++) {
+ Add (value[i]);
+ }
}
public void AddRange (CodeCommentStatementCollection value)
{
- foreach ( CodeCommentStatement elem in value )
- Add( elem );
+ if (value == null) {
+ throw new ArgumentNullException ("value");
+ }
+
+ int count = value.Count;
+ for (int i = 0; i < count; i++) {
+ Add (value[i]);
+ }
}
public bool Contains( CodeCommentStatement value )
public void Remove( CodeCommentStatement value )
{
- int index = IndexOf( value );
- if ( index < 0 )
- throw( new ArgumentException( "The specified object is not found in the collection" ) );
- RemoveAt( index );
+ List.Remove (value);
}
}
}