private async void btnAdd_ClickAsync(object sender, EventArgs e) { if (txtName.Text.Length <= 1) { MessageBox.Show("Common.. Input a proper name please."); } else if (txtNumber.Text.Length <= 1) { MessageBox.Show("Really..?! Is that a proper length number ?"); } int status = await book.CreateContact(txtName.Text, txtNumber.Text); if (status == 0) { MessageBox.Show("Phone number not in proper format."); } else if (status == 2) { MessageBox.Show("Duplicate Entry. Contact already exists."); } completesource.Add(txtName.Text); rebind_data(); }