Home>
///construct a random number seed
static int getrandomseed ()
{
      byte [] bytes=new byte [4];
      system.security.cryptography.rngcryptoserviceprovider rng=new system.security.cryptography.rngcryptoserviceprovider ();
      rng.getbytes (bytes);
      return bitconverter.toint32 (bytes, 0);
}
///generate random numbers
static int rnd ()
{
      random ran=new random (getrandomseed ());
      int cnt=ran.next (0,59);
      return cnt;
 }
c
  • Previous C # implements three methods to simulate automatic login and submit POST information
  • Next C # implements calculation of birthday characters