title: Can I leave out values from the range, when I'm using Random.Next method?
body: <p>I am making a password generator wich needs to make a string of upper and lower case letters givin in a random order. The max and min value is specified by two sliders.</p>
  
  <p>I would like to give up two ranges (65, 90) and (97, 122) for the int variable that returns the number for the charachter, instead of using two variables with a different range.</p>
  
  <p>When I use the range of (65, 122) there are characters being given that I don't want, when generating the password.</p>
  
  <pre><code>    private void btnPaswoord_Click(object sender, RoutedEventArgs e)
      {
          GenereerPaswoord();
      }
  
      private void GenereerPaswoord()
      {
          int iMin = Convert.ToInt32(sldMin.Value);
          int iMax = Convert.ToInt32(sldMax.Value);
  
          txtPasw.Text = GeefPaswoord(iMin, iMax );
      }
  
  
      private string GeefPaswoord(int iMin, int iMax)
      {
          string sPaswoord ="";
  
          if (sldMin.Value &lt;= sldMax.Value)
          {
          int iLengtePaswoord = moWillekeurig.Next(iMin, iMax + 1);
  
          for (int iTeller = 0; iTeller &lt; iLengtePaswoord; iTeller ++ )
          {
              int iAsciiWaarde = moWillekeurig.Next(65, 123);
              char cLetter = (char)iAsciiWaarde;
  
              sPaswoord = sPaswoord + cLetter;
          }
              }
          else
          {
              sldMin.Value = sldMax.Value;
          }
          return sPaswoord;
      }
  </code></pre>