title: Creating a Yes No Dialog box
body: <p>I am creating an addon for Microsoft Dynamics Rms. I created a quick Tender button and this button works fine. I want to add a Yes NO dialog box but I am having some problems.</p>
  
  <p>It works if I dont include the MessageBox </p>
  
  <pre><code>public class Addin : Addin_Interface
  {
      public bool Process(QSRules.SessionClass mySession)
      {
          if (MessageBox.Show("Do you want to Tender €10", "Tender Amount", 
              MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
          {
              SendKeys.Send("{F12}{DOWN}10.00{{ENTER}");
              return true;
              // return false;
          }
      }
  }
  </code></pre>
  
  <p>I have a red error line on the Process on this line</p>
  
  <pre><code>public bool Process(QSRules.SessionClass mySession)
  </code></pre>
  
  <p>The error says Not all code paths return a value. Below is an image of the error</p>
  
  <p><a href="https://i.stack.imgur.com/qgLeV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qgLeV.png" alt="Visual Studio - not all code paths return a value"></a></p>