Skip to content

Support generating random 64-bit values. #26741

@tannergooding

Description

@tannergooding

Rationale

It is sometimes desirable to generate random numbers as inputs to tests. This works nicely for the majority of the primitive types, but not for long/ulong.

As such, I propose a method be exposed that allows the generation of random 64-bit integer values.

Proposed API

public class Random { public virtual long NextInt64(); public virtual long NextInt64(long maxValue); public virtual long NextInt64(long minValue, long maxValue); }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions