private void BuscarCEP(object sender, EventArgs args) { string cep = CEP.Text.Trim(); if (isValiadCEP(cep)) { try { Endereco end = ViaCepServico.BuscarEndercoViaCEP(cep); if (end != null) { RESULTADO.Text = string.Format("Endereço:{2} {3} {0},{1} ", end.Localidade, end.Uf, end.Lougradouro, end.Bairro); } else { DisplayAlert("ERRO CRÍTICO", "O endereço não foi encontrado para o CEP: " + cep, "OK"); } }catch (Exception e) { DisplayAlert("ERRO CRÍTICO", e.Message, "OK"); } } }