Class Random can be instantiated using a constructor without parameters and MSDN says that in this case it is seeded with some time-dependent value.
Is the way to derive that time-dependent value documented anywhere? Can I reproduce it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
It’s not documented, and I think that’s on purpose. I don’t see any good reason why something like this should be documented and the framework implementers should be able to choose how exactly to do this.
But if you want to know how does it work currently, just use ildasm or Reflector. Reflector will give you this (.Net 4.5 beta):
If you look at the source code of mono, you will see that since 2003, it does exactly the same thing.