How can i Validate my Entry text box with only double Values?

private void onContinue(object sender,EventArgs e){
if((myEntry.Text==null)||!(double.Parse(myEntry.Text)>0)&&(double.Parse(myEntry.Text)<10)){
DisplayAlert("Error","Enter Valid Value","Cancel","ok");
}
else{
Naviagation.PushAsync(new finalPage());
}
}

//Now on clicking a continue button it will call the clicked onContinue function and check the validation conditions and if value is valid then it will get navigated to finalPage. But my issue is that when i click in the entry box and press backspace without entering value the application is showing unhandled exception. So , is there any way to rectify this exception error

Answers

Sign In or Register to comment.