Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7775665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:41:29+00:00 2026-06-01T17:41:29+00:00

I know default c# Random() is a pseudo-random number sequence. I just need one

  • 0

I know default c# Random() is a pseudo-random number sequence.
I just need one like this, I am not looking for real-random at this question.

Allow me ask questions:

I tried: new Random(100000000).Next(999999999), I got 145156561, just like some other people said.

My question is: will the pseudo-random number sequence by same seed changes at different system (win2003, win2008, mono etc), at different .net version (.net 3, .net 4, c# 2, c# 3 etc), or will be changed at any other environment?

All I want to know, once I coded, will I always get a same pseudo-random number sequence by same seed everywhere, now and future?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:41:30+00:00Added an answer on June 1, 2026 at 5:41 pm

    Not reliably. In general, the way to figure out this kind of thing is to look at the documentation (MSDN for .NET). If the algorithm is not described and isn’t an implementation of an otherwise-published algorithm, it should be considered an implementation detail and subject to change.

    You need to read these docs pretty strictly too- if there is room for interpretation, you need to assume worst case scenario. In this case: http://msdn.microsoft.com/en-us/library/system.random.aspx only states:

    Providing an identical seed value to different Random objects causes
    each instance to produce identical sequences of random numbers.

    And that it applies to Frameworks:

    Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0 .NET Framework Client Profile

    Supported in: 4, 3.5 SP1 Portable Class Library

    Supported in: Portable Class Library

    Nothing about that says whether it is guaranteed to work the same way across any future versions, or even whether you’ll get the same outcome from the various supported frameworks. In fact, it states:

    Notes to Callers

    The implementation of the random number generator in
    the Random class is not guaranteed to remain the same across major
    versions of the .NET Framework. As a result, your application code
    should not assume that the same seed will result in the same
    pseudo-random sequence in different versions of the .NET Framework.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know if by default is Hashtable passed by reference or
I created a random generator for cryptography purposes I would like to know if
Here's my code: #This is a game to guess a random number. import random
I have some question about functions which have default parameters. import sys from random
I know the default is ByVal in C#. I used same variable names in
Do you know the default isolation level of the transactions used in Django? Is
For any given type i want to know its default value. In C#, there
I know mongrel is the default server for script/server but when I do that
Anyone know how to turn off the default error page or where it's referenced??
By default nunit tests run alphabetically. Does anyone know of any way to set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.