con有一个State属性 对应的conn.State == ConnectionState.Open || conn.State == ConnectionState.Broken不懂的属性请看MSDN
看con.state