title: Membership.GeneratePassword doesn't conform to numberOfNonAlphaNumericCharacters
body: <p>I'm using Membership.GeneratePassword(10, 0). </p>
  
  <p>i.e. Number of Non-AlphaNumeric characters should be zero, as per the MSDN defintion: <a href="http://msdn.microsoft.com/en-us/library/system.web.security.membership.generatepassword(VS.80).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/system.web.security.membership.generatepassword(VS.80).aspx</a></p>
  
  <p>However, I noted that this didn't conform to what I expected. Is there a bug in the algorithm, or is it normal to see this? I still see a fair amount of punctuation characters in the password that is generated when I expect to see zero.</p>
  
  <p>As a test, I threw a Grid on an ASP.NET page and wrote this to see what the output was:</p>
  
  <pre><code>public partial class Verification : System.Web.UI.Page
  {
      protected void Page_Load(object sender, EventArgs e)
      {
          int max = 0; // change as required
          List&lt;MemberPassword&gt; list = new List&lt;MemberPassword&gt;();
          for (int i = 0; i &lt;= 20; i++)
          {
              for (int j = 0; j &lt;= max; j++)
              {
                  string display = String.Format("Membership.GeneratePassword(10, {0})", j);
                  list.Add(new MemberPassword(i, j, Membership.GeneratePassword(10, j), display));
              }
          }
  
          this.GridView1.DataSource = list;
          this.GridView1.DataBind();
      }
  }
  
  public class MemberPassword
  {
      public MemberPassword(int id, int numNonAlphaNum, string password, string display)
      {
          this.Id = id;
          this.NumNonAlphaNum = numNonAlphaNum;
          this.Password = password;
          this.Display = display;
      }
  
      public int Id { get; set; }
      public int NumNonAlphaNum { get; set; }
      public string Password { get; set; }
      public string  Display { get; set; }
  }
  </code></pre>
  
  <p>Although the results show a progression towards more and more punctuation, the actual requirement is not honoured.</p>
  
  <p>Have I got the wrong end of the stick here or am I losing the plot? :-)</p>