please i want to write a program that will produce sets of random numbers in c#, i need someone to put me through on how will i start and the style to use and please i need a very good ebook on progamming in c# for dummies.
Dr peter
0
Newbie Poster
Recommended Answers
Jump to PostHi Dr Peter, welcome! :)
Have a look here: http://msdn.microsoft.com/en-us/library/system.random(v=VS.100).aspx
and this: http://www.csharp-station.com/Default.aspx
Jump to PostHere is a simple example using Randiom class:
static void Main(string[] args) { Random r = new Random(); int[] numbers = new int[5]; //lets create an integer array (here we only create indexes, no values inside yet for (int i = 0; i < numbers.Length; i++) //lets …
Jump to PostYeah that kind of seems like overkill. I am not sure how many CPU cycles all that would take, but if you are using the random numbers for something useful (like a statistical simulation) the less CPU the better. I would say seeding Random() once with that method should suffice. …
All 10 Replies
ddanbe
2,724
Professional Procrastinator
Featured Poster
Mitja Bonca
557
Nearly a Posting Maven
sknake
1,622
Senior Poster
Featured Poster
pseudorandom21
166
Practically a Posting Shark
skatamatic
371
Practically a Posting Shark
sknake
1,622
Senior Poster
Featured Poster
skatamatic
371
Practically a Posting Shark
pseudorandom21
166
Practically a Posting Shark
sknake
1,622
Senior Poster
Featured Poster
shiva07
3
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.