title: How to generate a string with less than / more than length
body: <p>I would like to allow users to choose the exact length, or less than / more than count o characters to be generated (in a password generator).</p>
  <p>For example i have done:</p>
  <pre><code>// the longivity of the generated string  
  var stringChars = new char[int.Parse(TextBox2.Text)];
  var random = new Random();
  
  for (int i = 0; i &lt; stringChars.Length; i++)
  {
    // abc has been declared before, it is simply ABCD... for character generation
    stringChars[i] = abc[random.Next(abc.Length)];
  }
  
  var finalString = new String(stringChars);
  // this is the result box
  TextBox1.Text = finalString;
  </code></pre>
  <p>Now my problem is if user enters for eg. 10 and wants less than 10 characters of generated string, what should I do?</p>