2 // System.CodeDom CodeStatementCollection Class implementation
5 // Miguel de Icaza (miguel@ximian.com)
6 // Daniel Stodden (stodden@in.tum.de)
8 // (C) 2001 Ximian, Inc.
11 using System.Runtime.InteropServices;
12 using System.Collections;
14 namespace System.CodeDom
17 [ClassInterface(ClassInterfaceType.AutoDispatch)]
19 public class CodeStatementCollection
25 public CodeStatementCollection()
29 public CodeStatementCollection( CodeStatement[] value )
34 public CodeStatementCollection( CodeStatementCollection value )
42 public CodeStatement this[int index]
45 return (CodeStatement)List[index];
55 public void Add (CodeStatement value)
60 public void AddRange (CodeStatement [] value )
62 foreach ( CodeStatement elem in value )
66 public void AddRange (CodeStatementCollection value)
68 foreach ( CodeStatement elem in value )
72 public bool Contains( CodeStatement value )
74 return List.Contains( value );
77 public void CopyTo( CodeStatement[] array, int index )
79 List.CopyTo( array, index );
82 public int IndexOf( CodeStatement value )
84 return List.IndexOf( value );
87 public void Insert( int index, CodeStatement value )
89 List.Insert( index, value );
92 public void Remove( CodeStatement value )
94 int index = IndexOf( value );
96 throw( new ArgumentException( "The specified object is not found in the collection" ) );