Click here to Skip to main content
15,902,114 members
Home / Discussions / C#
   

C#

 
GeneralRe: Divide an image Pin
Christian Graus30-Jun-08 16:09
protectorChristian Graus30-Jun-08 16:09 
GeneralRe: Divide an image Pin
gigahertz20530-Jun-08 16:14
gigahertz20530-Jun-08 16:14 
GeneralRe: Divide an image Pin
gigahertz20530-Jun-08 16:56
gigahertz20530-Jun-08 16:56 
GeneralRe: Divide an image Pin
Rao Rafique30-Jun-08 18:27
Rao Rafique30-Jun-08 18:27 
GeneralRe: Divide an image Pin
Christian Graus30-Jun-08 18:57
protectorChristian Graus30-Jun-08 18:57 
QuestionRandom Class Pin
hadad30-Jun-08 13:43
hadad30-Jun-08 13:43 
AnswerRe: Random Class Pin
Christian Graus30-Jun-08 14:04
protectorChristian Graus30-Jun-08 14:04 
GeneralRe: Random Class Pin
Megidolaon1-Jul-08 2:55
Megidolaon1-Jul-08 2:55 
Christian Graus wrote:
To do what you want, build a list of 16 ints, 0-15. Get a random number from 0-15 and pull that index out of the array. For your next number, get a random digit between 0 and 14. And so on.

That wouldn't help much because even if you reduce the number each time, you can still get the same number multiple times (if the first Next() returns 3, nothing stops the next call of the method to return 3 again).

You should save the numbers in a generic List, because it has a variable amount of items and you can still access the items by int indexes.

Then call Next() and after getting the value from the list, remove the index that just has been generated by Next (you need to save its result in some variable).
For the next step, you'd need to create a new random with the changed count of the now smaller List as seed (why can't you change the seed of a random after it's been created anyway?).
QuestionHide "sender" of a mail c# Pin
Member 431105730-Jun-08 10:31
Member 431105730-Jun-08 10:31 
AnswerRe: Hide "sender" of a mail c# Pin
Christian Graus30-Jun-08 10:40
protectorChristian Graus30-Jun-08 10:40 
GeneralRe: Hide "sender" of a mail c# Pin
Bert delaVega30-Jun-08 11:17
Bert delaVega30-Jun-08 11:17 
AnswerRe: Hide "sender" of a mail c# Pin
Guffa30-Jun-08 12:38
Guffa30-Jun-08 12:38 
GeneralRe: Hide "sender" of a mail c# Pin
Member 431105730-Jun-08 22:49
Member 431105730-Jun-08 22:49 
QuestionNewbie Question - Displaying Data Pin
kruegersck30-Jun-08 10:22
kruegersck30-Jun-08 10:22 
AnswerRe: Newbie Question - Displaying Data Pin
paas30-Jun-08 10:39
paas30-Jun-08 10:39 
AnswerRe: Newbie Question - Displaying Data Pin
Christian Graus30-Jun-08 10:41
protectorChristian Graus30-Jun-08 10:41 
QuestionP/Invoke Problem (can't find the .dll) Pin
oscarderooij30-Jun-08 10:03
oscarderooij30-Jun-08 10:03 
AnswerRe: P/Invoke Problem (can't find the .dll) Pin
PIEBALDconsult30-Jun-08 10:18
mvePIEBALDconsult30-Jun-08 10:18 
GeneralRe: P/Invoke Problem (can't find the .dll) Pin
oscarderooij1-Jul-08 2:10
oscarderooij1-Jul-08 2:10 
GeneralRe: P/Invoke Problem (can't find the .dll) Pin
oscarderooij1-Jul-08 2:22
oscarderooij1-Jul-08 2:22 
AnswerRe: P/Invoke Problem (can't find the .dll) Pin
Kythen30-Jun-08 10:30
Kythen30-Jun-08 10:30 
GeneralRe: P/Invoke Problem (can't find the .dll) Pin
oscarderooij1-Jul-08 2:29
oscarderooij1-Jul-08 2:29 
AnswerRe: P/Invoke Problem (can't find the .dll) Pin
Luc Pattyn30-Jun-08 10:37
sitebuilderLuc Pattyn30-Jun-08 10:37 
GeneralRe: P/Invoke Problem (can't find the .dll) Pin
oscarderooij1-Jul-08 2:34
oscarderooij1-Jul-08 2:34 
GeneralRe: P/Invoke Problem (can't find the .dll) Pin
Luc Pattyn1-Jul-08 3:32
sitebuilderLuc Pattyn1-Jul-08 3:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.