RandomHelper.cs 261 B

123456789101112131415
  1. using System;
  2. namespace Common.Helper
  3. {
  4. public static class RandomHelper
  5. {
  6. public static UInt64 RandUInt64()
  7. {
  8. var bytes = new byte[8];
  9. Random random = new Random();
  10. random.NextBytes(bytes);
  11. return BitConverter.ToUInt64(bytes, 0);
  12. }
  13. }
  14. }