private void checkIfServerIsAccessible() { var address = WebRequests.GetExternalIP(); var port = Items.First(f => f.Name == "Port").Value; var serverList = WebRequests.GetServerList(); if (serverList.Contains(address.ToString())) { MessageBox.Show(string.Format("Server (IP: {0}) found in master server list!", address.ToString()), "Check successful!"); } else { MessageBox.Show(string.Format("Server (IP: {0}) not found in master server list!", address.ToString()), "Check failed!"); } }