private void BuscarCEP(object sender, EventArgs args) { string cep = CEP.Text.Trim(); if (isValidCep(cep)) { try { Endereco end = ViaCEPServico.BuscaCep(cep); if (end != null) { RESULTADO.Text = string.Format("Endereço: {0},{1} {2}", end.Localidade, end.Uf, end.Logradouro); } else { DisplayAlert("Erro", "Voce digitou um CEP invalido", "OK"); } } catch (Exception e) { DisplayAlert("Erro Crítico", e.Message, "OK"); } } }