Click here to Skip to main content
15,909,332 members
Home / Discussions / C#
   

C#

 
GeneralRe: Wierdness trying to use a class library in a service Pin
ByStorm Software6-Feb-06 9:48
ByStorm Software6-Feb-06 9:48 
QuestionXsltArgumentList doesn't accept long parameter values Pin
mikko laanti6-Feb-06 4:21
mikko laanti6-Feb-06 4:21 
AnswerRe: XsltArgumentList doesn't accept long parameter values Pin
leppie6-Feb-06 5:21
leppie6-Feb-06 5:21 
QuestionAdd to favourites Pin
Brendan Vogt6-Feb-06 3:51
Brendan Vogt6-Feb-06 3:51 
Questionstatus bar Pin
Kola Sokol6-Feb-06 3:41
Kola Sokol6-Feb-06 3:41 
AnswerRe: status bar Pin
Ravi Bhavnani6-Feb-06 4:04
professionalRavi Bhavnani6-Feb-06 4:04 
GeneralRe: status bar Pin
Kola Sokol6-Feb-06 5:06
Kola Sokol6-Feb-06 5:06 
Questionmemcopy in C# ? Pin
smoitry6-Feb-06 3:28
smoitry6-Feb-06 3:28 
AnswerRe: memcopy in C# ? Pin
Judah Gabriel Himango6-Feb-06 4:58
sponsorJudah Gabriel Himango6-Feb-06 4:58 
QuestionHelp with multiview control needed!! Pin
BenPage6-Feb-06 2:07
BenPage6-Feb-06 2:07 
Questionbit + sq Pin
ita_cas6-Feb-06 1:48
ita_cas6-Feb-06 1:48 
AnswerRe: bit + sq Pin
albCode6-Feb-06 2:01
albCode6-Feb-06 2:01 
Questioncombo box, datagrid problem Pin
steve1_rm20006-Feb-06 1:31
steve1_rm20006-Feb-06 1:31 
QuestionHow to create RadioButtonColumn for DataGridView Pin
USrinivas6-Feb-06 1:17
USrinivas6-Feb-06 1:17 
AnswerRe: How to create RadioButtonColumn for DataGridView Pin
luckyv6-Feb-06 3:03
luckyv6-Feb-06 3:03 
GeneralRe: How to create RadioButtonColumn for DataGridView Pin
USrinivas6-Feb-06 23:53
USrinivas6-Feb-06 23:53 
QuestionMS SQL 2000 Server usage Pin
cbhkenshin6-Feb-06 1:01
cbhkenshin6-Feb-06 1:01 
AnswerRe: MS SQL 2000 Server usage Pin
usernamed6-Feb-06 9:21
usernamed6-Feb-06 9:21 
QuestionLooking for a "best practice" advice Pin
Jan R Hansen6-Feb-06 0:43
Jan R Hansen6-Feb-06 0:43 
AnswerRe: Looking for a "best practice" advice Pin
dmivlad6-Feb-06 1:48
dmivlad6-Feb-06 1:48 
AnswerRe: Looking for a "best practice" advice Pin
Ravi Bhavnani6-Feb-06 2:33
professionalRavi Bhavnani6-Feb-06 2:33 
Jan R Hansen wrote:
want to process these command and then delete the command from the collection.


Since processItem() doesn't know anything about the commands in the collection (other than the one it's processing), you might consider simply doing this:
lock (col) {
  foreach (Command c in col)
      processItem (c);
  col.Clear();
}
If Command is a heavyweight object, you could try this approach:
lock (col) {
  for (int i=0; (i < col.Count); i++) {
      Command c = col[i] as Command;
      processItem (c);
      col[i] = null;
  }
  col.Clear();
}
/ravi

My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com

GeneralRe: Looking for a "best practice" advice Pin
Jan R Hansen6-Feb-06 9:06
Jan R Hansen6-Feb-06 9:06 
QuestionPosting an article to a blog from C# Pin
AB77715-Feb-06 23:57
AB77715-Feb-06 23:57 
AnswerRe: Posting an article to a blog from C# Pin
Colin Angus Mackay6-Feb-06 0:24
Colin Angus Mackay6-Feb-06 0:24 
GeneralRe: Posting an article to a blog from C# Pin
AB77716-Feb-06 0:35
AB77716-Feb-06 0:35 

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.