<PackageReference Include="System.Data.SqlClient" Version="4.8.2" />

SqlErrorCollection

public sealed class SqlErrorCollection : ICollection, IEnumerable
Collects all errors generated by the .NET Framework Data Provider for SQL Server. This class cannot be inherited.
using System.Collections; namespace System.Data.SqlClient { public sealed class SqlErrorCollection : ICollection, IEnumerable { public int Count { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public SqlError this[int index] { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } bool ICollection.IsSynchronized { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } object ICollection.SyncRoot { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } internal SqlErrorCollection() { } public void CopyTo(Array array, int index) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public void CopyTo(SqlError[] array, int index) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public IEnumerator GetEnumerator() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } }