Click here to Skip to main content
15,913,836 members
Home / Discussions / C#
   

C#

 
AnswerRe: Please Help Pin
Mircea Puiu30-Jan-07 3:22
Mircea Puiu30-Jan-07 3:22 
QuestionHow to get controls in grid column in runtime? Pin
babutkchn30-Jan-07 2:07
babutkchn30-Jan-07 2:07 
QuestionAccessing dbase database files(dbf format) Pin
ranandbe30-Jan-07 2:03
ranandbe30-Jan-07 2:03 
QuestionLabel update Pin
imnotso#30-Jan-07 1:06
imnotso#30-Jan-07 1:06 
AnswerRe: Label update Pin
Martin#30-Jan-07 1:19
Martin#30-Jan-07 1:19 
GeneralRe: Label update Pin
imnotso#30-Jan-07 1:21
imnotso#30-Jan-07 1:21 
GeneralRe: Label update Pin
Martin#30-Jan-07 1:26
Martin#30-Jan-07 1:26 
GeneralRe: Label update [modified] Pin
Pete O'Hanlon30-Jan-07 2:05
mvePete O'Hanlon30-Jan-07 2:05 
You will still only have one hashtable (or array). This would be created once, and you would only be incrementing values in it. Here's a sample for an ArrayList:

private ArrayList _list;

public void SetupArray(int maxRows)
{
  _list = new ArrayList();
  for (int i = 0; i < maxRows; i++)
  {
    _list.Add(0);
  }
}

public void RoleDice()
{
  int val = ValueFromDiceRole();

  Convert.ToInt64(_list[val])++;
}


Now, go ahead and call RoleDice one million times. Call it 10 million. The memory footprint won't go up that much.


-- modified at 8:20 Tuesday 30th January, 2007


the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer

Deja View - the feeling that you've seen this post before.

AnswerRe: Label update Pin
Luc Pattyn30-Jan-07 2:05
sitebuilderLuc Pattyn30-Jan-07 2:05 
GeneralRe: Label update Pin
imnotso#30-Jan-07 2:12
imnotso#30-Jan-07 2:12 
GeneralRe: Label update Pin
Martin#30-Jan-07 2:20
Martin#30-Jan-07 2:20 
GeneralRe: Label update Pin
imnotso#30-Jan-07 2:42
imnotso#30-Jan-07 2:42 
GeneralRe: Label update Pin
Martin#30-Jan-07 2:55
Martin#30-Jan-07 2:55 
GeneralRe: Label update Pin
imnotso#30-Jan-07 4:00
imnotso#30-Jan-07 4:00 
GeneralRe: Label update Pin
Martin#30-Jan-07 4:05
Martin#30-Jan-07 4:05 
GeneralRe: Label update [modified] Pin
Luc Pattyn30-Jan-07 2:42
sitebuilderLuc Pattyn30-Jan-07 2:42 
AnswerRe: Label update Pin
Jasmine250130-Jan-07 5:53
Jasmine250130-Jan-07 5:53 
GeneralRe: Label update [modified] Pin
imnotso#30-Jan-07 6:13
imnotso#30-Jan-07 6:13 
GeneralRe: Label update Pin
Dan Neely30-Jan-07 6:45
Dan Neely30-Jan-07 6:45 
GeneralRe: Label update Pin
Jasmine250130-Jan-07 18:34
Jasmine250130-Jan-07 18:34 
GeneralRe: Label update Pin
Jasmine250130-Jan-07 18:39
Jasmine250130-Jan-07 18:39 
GeneralRe: Label update Pin
imnotso#30-Jan-07 23:17
imnotso#30-Jan-07 23:17 
Questionconvert c# to vb.net Pin
Doritkatz30-Jan-07 1:00
Doritkatz30-Jan-07 1:00 
AnswerRe: convert c# to vb.net Pin
andre_swnpl30-Jan-07 1:19
andre_swnpl30-Jan-07 1:19 
GeneralRe: convert c# to vb.net Pin
Doritkatz30-Jan-07 1:55
Doritkatz30-Jan-07 1:55 

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.