How do i generate more than 1 random numbers in c#?
-
I want to generate 10 numbers between 1 and 20, there can be duplicate values. I have tried using: Random RandomNo = new Random(); No1 = RandomNum1.Next(20); No1 = RandomNum2.Next(20); No1 = RandomNum3.Next(20); ...................etc I always get the same number 10 times! PLZ SOMEONE PROVIDE THE CODE FOR ME!
-
Answer:
Try Random RandomNo = new Random(); No1 = RandomNo.Next(20); Have fun.
Pad at Yahoo! Answers Visit the source
Related Q & A:
- How do I generate documentation for a project?Best solution by Stack Overflow
- How can I run all my selenium tests sequentially in C#?Best solution by Stack Overflow
- How do I generate barcode using c#?Best solution by Stack Overflow
- How do i find people by cell phone numbers for free?Best solution by Yahoo! Answers
- How can I edit my myspace 1.0 Profile?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.