DotNetDupe
4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Toggle main menu visibility
Loading...
Searching...
No Matches
Random.h
Go to the documentation of this file.
1
5
6
#pragma once
7
8
#include "
Common.h
"
9
#include "
System/Object.h
"
10
11
namespace
DotNetDupe
{
12
namespace
System
{
13
18
class
Random
:
public
Object
{
19
public
:
21
DOTNETDUPE_API
Random
();
22
25
DOTNETDUPE_API
Random
(
int
seed);
26
29
DOTNETDUPE_API
virtual
int
Next
();
30
34
DOTNETDUPE_API
virtual
int
Next
(
int
maxValue);
35
40
DOTNETDUPE_API
virtual
int
Next
(
int
minValue,
int
maxValue);
41
45
DOTNETDUPE_API
virtual
void
NextBytes
(
unsigned
char
* buffer,
int
bufferSize);
46
49
DOTNETDUPE_API
virtual
double
NextDouble
();
50
51
private
:
52
int
_seed;
53
};
54
}
55
}
Common.h
Defines common cross-platform macros, export decorators, and fundamental types.
DOTNETDUPE_API
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition
Common.h:20
Object.h
Base object class for DotNetDupe mirroring .NET System.Object.
DotNetDupe::System::Object
Supports all classes in the DotNetDupe class hierarchy.
Definition
Object.h:18
DotNetDupe::System::Random::NextDouble
virtual double NextDouble()
Returns a random floating-point number that is greater than or equal to 0.0, and less than 1....
Definition
Random.cpp:41
DotNetDupe::System::Random::Random
Random()
Initializes a new instance of the Random class, using a time-dependent default seed value.
Definition
Random.cpp:7
DotNetDupe::System::Random::Next
virtual int Next()
Returns a non-negative random integer.
Definition
Random.cpp:11
DotNetDupe::System::Random::NextBytes
virtual void NextBytes(unsigned char *buffer, int bufferSize)
Fills the elements of a specified array of bytes with random numbers.
Definition
Random.cpp:32
DotNetDupe::System
Definition
Action.h:11
DotNetDupe
Definition
IServiceCollection.h:7
Include
System
Random.h
Generated by
1.18.0