Windows フォーム アプリケーションを作成していて、サーバーの名前をテキスト ボックスのテキストと比較したいのですが、このサーバー名を取得するにはどうすればよいですか?
このコードを接続に使用しています。
SqlConnection myConnection = new SqlConnection("user id=username;" + "password=password;server=serverurl;" + "Trusted_Connection=yes;" + "database=database; " + "connection timeout=30");