title: Using RNGCryptoServiceProvider method to generate Integer between 4 digit to 6 digit
body: <p>Sir,</p>
  
  <p>I have used <code>RNGCryptoServiceProvider</code> method to generate integer between the range of 4 digit and 6 digit. Error showed me as <code>Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: startIndex</code> on line <code>int rnum = r.Next(BitConverter.ToInt32(rno, 100000));</code>. </p>
  
  <p>Below is code that I am using :</p>
  
  <pre><code>RNGCryptoServiceProvider rg = new RNGCryptoServiceProvider();
                                  byte[] rno = new byte[6];
                                  rg.GetBytes(rno);
                                  Random r = new Random();
                                  int rnum = r.Next(BitConverter.ToInt32(rno, 100000));
  </code></pre>
  
  <p>How should I achieve this?</p>