Click here to Skip to main content
15,922,696 members
Home / Discussions / C#
   

C#

 
GeneralRe: reading from a file and retrieving contents Pin
Morgs Morgan9-Apr-10 3:32
Morgs Morgan9-Apr-10 3:32 
QuestionA reference to 'mscorlib' cannot be added Pin
sekannak9-Apr-10 2:00
sekannak9-Apr-10 2:00 
AnswerRe: A reference to 'mscorlib' cannot be added Pin
Luc Pattyn9-Apr-10 2:06
sitebuilderLuc Pattyn9-Apr-10 2:06 
AnswerRe: A reference to 'mscorlib' cannot be added Pin
Morgs Morgan9-Apr-10 2:13
Morgs Morgan9-Apr-10 2:13 
AnswerRe: A reference to 'mscorlib' cannot be added Pin
harold aptroot9-Apr-10 2:28
harold aptroot9-Apr-10 2:28 
GeneralMessage Removed Pin
9-Apr-10 2:31
sekannak9-Apr-10 2:31 
GeneralRe: A reference to 'mscorlib' cannot be added Pin
harold aptroot9-Apr-10 2:34
harold aptroot9-Apr-10 2:34 
RantRe: A reference to 'mscorlib' cannot be added Pin
harold aptroot9-Apr-10 3:30
harold aptroot9-Apr-10 3:30 
AnswerRe: A reference to 'mscorlib' cannot be added Pin
sekannak9-Apr-10 2:33
sekannak9-Apr-10 2:33 
GeneralRe: A reference to 'mscorlib' cannot be added Pin
Dave Kreskowiak9-Apr-10 3:19
mveDave Kreskowiak9-Apr-10 3:19 
AnswerRe: A reference to 'mscorlib' cannot be added Pin
Luc Pattyn9-Apr-10 2:36
sitebuilderLuc Pattyn9-Apr-10 2:36 
AnswerRe: A reference to 'mscorlib' cannot be added Pin
PIEBALDconsult9-Apr-10 4:41
mvePIEBALDconsult9-Apr-10 4:41 
Questionup_down control Pin
Member 5903109-Apr-10 1:33
Member 5903109-Apr-10 1:33 
AnswerRe: up_down control Pin
Dave Kreskowiak9-Apr-10 3:10
mveDave Kreskowiak9-Apr-10 3:10 
QuestionRandom.next(min,max) Pin
igalep1329-Apr-10 0:42
igalep1329-Apr-10 0:42 
AnswerRe: Random.next(min,max) Pin
Luc Pattyn9-Apr-10 0:55
sitebuilderLuc Pattyn9-Apr-10 0:55 
GeneralRe: Random.next(min,max) Pin
igalep1329-Apr-10 1:02
igalep1329-Apr-10 1:02 
GeneralRe: Random.next(min,max) Pin
Luc Pattyn9-Apr-10 1:08
sitebuilderLuc Pattyn9-Apr-10 1:08 
GeneralRe: Random.next(min,max) Pin
igalep1329-Apr-10 1:18
igalep1329-Apr-10 1:18 
GeneralRe: Random.next(min,max) Pin
David Skelly9-Apr-10 2:05
David Skelly9-Apr-10 2:05 
GeneralRe: Random.next(min,max) Pin
PIEBALDconsult9-Apr-10 3:34
mvePIEBALDconsult9-Apr-10 3:34 
GeneralRe: Random.next(min,max) Pin
Luc Pattyn9-Apr-10 1:56
sitebuilderLuc Pattyn9-Apr-10 1:56 
GeneralRe: Random.next(min,max) Pin
David Skelly9-Apr-10 2:29
David Skelly9-Apr-10 2:29 
Off topic, so feel free to ignore this, but your loop count looks a bit odd to me. You increment i and test for it being less than zeroFrequencyLetterList.Count. But you remove an entry from the list each time through the loop. So, this loop will drop out before it has processed the entire list. Here is what happens if you have 10 entries in the list:

 i   Count
===  =====
 0    10
 1     9
 2     8
 3     7
 4     6
 5     5


The loop will stop at this point, so although you have 10 entries in the list you will only process 5 of them.

Not only that, but you will skip entries in the list. First time through, i is 0 so you remove the entry at index 0, so the entry that was at index 1 is now at index 0, and the entry at index 2 is now at 1. Next time through, i is 1 so you now pick up the entry at index 1 which means you have skipped the entry which was previously at index 1 but is now at index 0. (That's a bit confused, but if you think about it you'll see what I mean.)

That may be what you want, but it looks a bit strange to me.
GeneralRe: Random.next(min,max) [modified] Pin
igalep1329-Apr-10 2:42
igalep1329-Apr-10 2:42 
GeneralRe: Random.next(min,max) Pin
David Skelly9-Apr-10 2:57
David Skelly9-Apr-10 2:57 

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.