private void BuscarCEP(object sender, EventArgs args) { //validação string cep = CEP.Text.Trim(); RESULTADO.Text = ""; if (isValidCEP(cep)) { try { Endereco end = ViaCEPServico.BuscarEnderecoCiaCEP(cep); if (end != null) { RESULTADO.Text = string.Format("Endereço: {2} {3} {0},{1} ", end.localidade, end.uf, end.logradouro, end.bairro); } else { DisplayAlert("ERRO", "O endereço nao foi encontrado para o cep informado", "OK"); } }catch (Exception e) { DisplayAlert("ERRO CRITICO", e.Message, "OK"); } } }