Check out example codes for "c# yes or no dialog". It will help you in understanding the concepts better.

Code Example 1

DialogResult dialogResult = MessageBox.Show("Sure", "Some Title", MessageBoxButtons.YesNo);
if(dialogResult == DialogResult.Yes)
{
    //do something
}
else if (dialogResult == DialogResult.No)
{
    //do something else
}

Learn ReactJs, React Native from akashmittal.com