HaemmerElectronics.SeppPenner.DotNetEasyRandom 1.0.11

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package HaemmerElectronics.SeppPenner.DotNetEasyRandom --version 1.0.11                
NuGet\Install-Package HaemmerElectronics.SeppPenner.DotNetEasyRandom -Version 1.0.11                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HaemmerElectronics.SeppPenner.DotNetEasyRandom" Version="1.0.11" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HaemmerElectronics.SeppPenner.DotNetEasyRandom --version 1.0.11                
#r "nuget: HaemmerElectronics.SeppPenner.DotNetEasyRandom, 1.0.11"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install HaemmerElectronics.SeppPenner.DotNetEasyRandom as a Cake Addin
#addin nuget:?package=HaemmerElectronics.SeppPenner.DotNetEasyRandom&version=1.0.11

// Install HaemmerElectronics.SeppPenner.DotNetEasyRandom as a Cake Tool
#tool nuget:?package=HaemmerElectronics.SeppPenner.DotNetEasyRandom&version=1.0.11                


DotNetEasyRandom is an assembly/ library to generate random numbers with the internal Random library from .Net more easily.

Build status GitHub issues GitHub forks GitHub stars License: MIT Nuget NuGet Downloads Known Vulnerabilities Gitter

Available for

  • Net 6.0
  • Net 7.0
  • Net 8.0

Net Core and Net Framework latest and LTS versions

Basic usage

public class ExampleUsage
    private readonly IEasyRandom _random = new EasyRandom(); //Normal construtor

    private readonly IEasyRandom _random2 = new EasyRandom(12); //Construtor with seed

    public void Test()
        _random.Next(); //Function from the "normal" Random class
        _random.Next(12); //Function from the "normal" Random class
        _random.Next(1, 5, IncludeType.None); //Gives back 2, 3 or 4
        _random.Next(1, 5, IncludeType.StartOnly); //Gives back 1, 2, 3 or 4
        _random.Next(1, 5, IncludeType.EndOnly); //Gives back 2, 3, 4 or 5
        _random.Next(1, 5, IncludeType.Both); //Gives back 1, 2, 3, 4 or 5
        _random.NextBytes(new byte[] {1, 2, 3, 4}); //Function from the "normal" Random class
        _random.NextDouble(); //Function from the "normal" Random class
        _random.NextDoubleExcludedBoth(1.0, 2.0);
        //Gives back a double value between 1.0 and 2.0 EXCLUDING the borders
        //(e.g. from 1.0000000000000000000000000000000001 to 1.9999999999999999999999999999999999


dotnet add package HaemmerElectronics.SeppPenner.DotNetEasyRandom

Change history

See the Changelog.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.12 83 5/16/2024
1.0.11 205 12/7/2023
1.0.10 128 11/13/2023
1.0.9 341 11/10/2022
1.0.8 350 10/30/2022
1.0.7 432 2/13/2022
1.0.6 311 11/11/2021
1.0.5 334 8/9/2021
1.0.4 351 7/25/2021
1.0.3 350 2/21/2021
1.0.2 387 11/23/2020

Version (2023-12-07): Updated NuGet packages, added support for Net8.0.