-
-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
nanoframework/nf-interpreter
#840Description
Details about Problem
nanoFramework area: nanoCLR preview 791 / nanoFramework.CoreLibrary preview 62
Worked before? No
Detailed repro steps so we can see the same problem
The Random.Next returns not only values >= 0. I think that's caused by the nanoFramework.CoreLibrary Random.Next implementation. There is the uint32 return value from the unmanged part returned as int32
In nanoFramework.CoreLibrary:
/// <summary>
/// Returns a nonnegative random number.
/// </summary>
/// <returns>A 32-bit signed integer greater than or equal to zero and
/// less than MaxValue.</returns>
[MethodImpl(MethodImplOptions.InternalCall)]
public virtual extern int Next();
But in nanoCLR the return type is uint32_t