Clients that want to process warnings or informational messages sent by the server should create an System.Data.SqlClient.SqlInfoMessageEventHandler delegate to listen to this event.
The SqlConnection.InfoMessage event occurs when a message with a severity of 10 or less is returned by ssNoVersion. Messages that have a severity between 11 and 20 raise an error and messages that have a severity over 20 causes the connection to close. For more information on ssNoVersion error levels, see "Database Engine Error Severities" in ssNoVersion Books Online.
For more information and an example, see Working with Connection Events.