siva M

siva M

  • NA
  • 3
  • 764

sequence number

Mar 21 2016 8:37 AM
Hai
Mr.Arunkumar
your code
public static string GetUniqueKey(int maxSize)
{
char[] chars = new char[62];
chars = "123456789".ToCharArray();
byte[] data = new byte[1];
RNGCryptoServiceProvider crypto = new RNGCryptoServiceProvider();
crypto.GetNonZeroBytes(data);
data = new byte[maxSize];
crypto.GetNonZeroBytes(data);
StringBuilder result = new StringBuilder(maxSize);
foreach (byte b in data)
{
result.Append(chars[b % (chars.Length)]);
}
return result.ToString();
}
private void auto()
{
txtInvoiceNo.Text = GetUniqueKey(8);
}
will automaticaly generate the number how can i change it into sequence number pls replay

Answers (1)