12345678910111213141516171819 |
- namespace TBL.CSharp.Utilities.Random.Generator
- {
- /// <summary>
- /// 系统自带的随机数发生器
- /// <para>一般用于系统功能;由于不同设备的实现差异,因此不支持种子存取</para>
- /// </summary>
- public class SystemGenerator : System.Random, IRandom
- {
- /// <summary>
- /// 从种子构造
- /// </summary>
- /// <param name="seed">种子值</param>
- public SystemGenerator(int seed) : base(seed)
- {
- }
- public int NextRaw() => Next();
- }
- }
|