public static void ConnectionState() { string msg = "Connection state: " + "The connection is "; string title = SqlConn.myApp(); MessageBoxButtons btn = MessageBoxButtons.OK; MessageBoxIcon icon = MessageBoxIcon.Information; MessageBox.Show(msg + connection.State.ToString(), title, btn, icon); }
public Form1() { InitializeComponent(); this.Text = SqlConn.myApp(); }