Archive of ‘Sql’ category

SqlException class does’nt have public constructor

I am currently preparing 3.5 course so I try to throw SqlException in one of my examples and realize that SqlException class is sealed and has no public constructor. I have found solution on Rido blog how to create SqlException using reflection.         public static SqlException CreateSqlException(string errorMessage, int errorNumber)         […]