X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem%2FSystem.CodeDom%2FCodeStatementCollection.cs;h=3183b588ecf658d131194e871e44c85bf31668b7;hb=e8c67296c07b72efe7577458f732b025189012ae;hp=11a41280641c9003b9ed6d3f4ab97eaee6abac24;hpb=4a2ab0336e97f3591eebbb881a1471d3051946c9;p=mono.git diff --git a/mcs/class/System/System.CodeDom/CodeStatementCollection.cs b/mcs/class/System/System.CodeDom/CodeStatementCollection.cs index 11a41280641..3183b588ecf 100644 --- a/mcs/class/System/System.CodeDom/CodeStatementCollection.cs +++ b/mcs/class/System/System.CodeDom/CodeStatementCollection.cs @@ -127,10 +127,7 @@ namespace System.CodeDom public void Remove (CodeStatement 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); } } }