1 //------------------------------------------------------------------------------
2 // <copyright file="SqlErrorCollection.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
5 // <owner current="true" primary="true">[....]</owner>
6 // <owner current="true" primary="false">[....]</owner>
7 //------------------------------------------------------------------------------
9 namespace System.Data.SqlClient {
12 using System.Collections;
13 using System.ComponentModel;
14 using System.Diagnostics;
15 using System.Runtime.InteropServices;
17 [Serializable, ListBindable(false)]
18 public sealed class SqlErrorCollection : ICollection {
20 private ArrayList errors = new ArrayList();
22 internal SqlErrorCollection() {
25 public void CopyTo (Array array, int index) {
26 this.errors.CopyTo(array, index);
29 public void CopyTo (SqlError[] array, int index) {
30 this.errors.CopyTo(array, index);
34 get { return this.errors.Count;}
37 object System.Collections.ICollection.SyncRoot { // MDAC 68481
41 bool System.Collections.ICollection.IsSynchronized { // MDAC 68481
45 public SqlError this[int index] {
47 return (SqlError) this.errors[index];
51 public IEnumerator GetEnumerator() {
52 return errors.GetEnumerator();
55 internal void Add(SqlError error) {
56 this.errors.Add(error);