title: Nested 'if'-'else' statements
body: <p>I have code that's very messy with the <code>if</code> - <code>else</code> if checks it is doing. The amount of branching and nested branching is quite big (over 20 if - else if and nested too). It's making my code harder to read and will probably be a performance hog. My application checks for a lot of conditions it gets from the user and so the application must check all the time for different situations, for example:</p>
  
  <p>If the textbox text is not 0, continue with the next...</p>
  
  <pre><code>if ((StartInt != 0) &amp;&amp; (EndInt != 0))   
  {
  </code></pre>
  
  <p>And then here it checks to see whether the user have choosen dates: </p>
  
  <pre><code>if ((datePickerStart.SelectedDate == null) || (datePickerEnd.SelectedDate == null)) 
  {
      MessageBox.Show("Please Choose Dates");
  }
  </code></pre>
  
  <p>Here, if the datepickers aren't null it continues with code...</p>
  
  <pre><code>else if ((datePickerStart.SelectedDate != null) &amp;&amp; (datePickerEnd.SelectedDate != null))
  {
      // CONDITIONS FOR SAME STARTING DAY AND ENDING DAY.
      if (datePickerStart.SelectedDate == datePickerEnd.SelectedDate)
      {
          if (index1 == index2)
          {
              if (StartInt == EndInt)
              {
                  if (radioButton1.IsChecked == true)
                  {
                      printTime3();
                  }
                  else
                  {
                      printTime();
                  }
              }
  </code></pre>
  
  <p>This is just a small part of the checks being made. Some of them are functionals and some are for input validation stuff.</p>
  
  <p>Is there any way to make it more readable and less of a performance hog?</p>