You can do this:
SqlDataSourceEnumerator sdse = SqlDataSourceEnumerator.Instance;
DataTable dt = sdse.GetDataSources();
Console.WriteLine("Avalaiable sources:");
foreach (DataRow dr in dt.Rows)
{
Console.WriteLine(dr["ServerName"]);
}
If your server is in the list, it's available.
Note: you might want to do this in a background task: it takes a some seconds to scan your network.