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

SqlException

public sealed class SqlException : DbException
The exception that is thrown when SQL Server returns a warning or error. This class cannot be inherited.
using System.Data.Common; using System.Runtime.Serialization; namespace System.Data.SqlClient { public sealed class SqlException : DbException { public byte Class { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public Guid ClientConnectionId { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public SqlErrorCollection Errors { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public int LineNumber { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public int Number { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public string Procedure { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public string Server { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public override string Source { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public byte State { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } internal SqlException() { } public override void GetObjectData(SerializationInfo si, StreamingContext context) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public override string ToString() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } }