Search Results for

    Show / Hide Table of Contents

    Class LockedRandomizer

    Thread-safe class providing access to a single FM.LiveSwitch.LockedRandomizer.Randomizer.

    Inheritance
    System.Object
    LockedRandomizer
    Namespace: FM.LiveSwitch
    Assembly: FM.LiveSwitch.dll
    Syntax
    public static class LockedRandomizer : object

    Methods

    Next()

    Returns a nonnegative random number.

    Declaration
    public static int Next()
    Returns
    Type Description
    System.Int32

    Next(Int32)

    Returns a nonnegative random number less than the specified maximum.

    Declaration
    public static int Next(int maxValue)
    Parameters
    Type Name Description
    System.Int32 maxValue

    The maximum value (exclusive).

    Returns
    Type Description
    System.Int32

    Next(Int32, Int32)

    Returns a random number within a specified range.

    Declaration
    public static int Next(int minValue, int maxValue)
    Parameters
    Type Name Description
    System.Int32 minValue

    The minimum value (inclusive).

    System.Int32 maxValue

    The maximum value (exclusive).

    Returns
    Type Description
    System.Int32

    NextBytes(Byte[])

    Fills the elements of a specified array of bytes with random numbers.

    Declaration
    public static void NextBytes(byte[] buffer)
    Parameters
    Type Name Description
    System.Byte[] buffer

    The array of bytes to fill.

    NextDouble()

    Returns a random number between 0.0 and 1.0.

    Declaration
    public static double NextDouble()
    Returns
    Type Description
    System.Double

    NextLong()

    Returns a nonnegative random number.

    Declaration
    public static long NextLong()
    Returns
    Type Description
    System.Int64

    RandomString(Int32)

    Generates a random string of a specified size.

    Declaration
    public static string RandomString(int size)
    Parameters
    Type Name Description
    System.Int32 size

    The size of the output string.

    Returns
    Type Description
    System.String
    In This Article
    Back to top Copyright © LiveSwitch Inc. All Rights Reserved. Doc build for LiveSwitch v1.15.0