Click here to Skip to main content
15,888,052 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Posting an article to a blog from C# Pin
Ravi Bhavnani6-Feb-06 2:37
professionalRavi Bhavnani6-Feb-06 2:37 
GeneralRe: Posting an article to a blog from C# Pin
AB77716-Feb-06 2:50
AB77716-Feb-06 2:50 
GeneralRe: Posting an article to a blog from C# Pin
Ravi Bhavnani6-Feb-06 4:02
professionalRavi Bhavnani6-Feb-06 4:02 
GeneralRe: Posting an article to a blog from C# Pin
AB77716-Feb-06 18:56
AB77716-Feb-06 18:56 
AnswerRe: Posting an article to a blog from C# Pin
Ravi Bhavnani7-Feb-06 2:08
professionalRavi Bhavnani7-Feb-06 2:08 
QuestionExcel SaveAs() method Pin
Sandrina5-Feb-06 23:54
Sandrina5-Feb-06 23:54 
QuestionCan We place RadioButtons in DataGridView Pin
USrinivas5-Feb-06 23:43
USrinivas5-Feb-06 23:43 
Questionp/invoke c++ classes with virtual functions Pin
mintguy5-Feb-06 23:01
mintguy5-Feb-06 23:01 
AnswerRe: p/invoke c++ classes with virtual functions Pin
leppie6-Feb-06 0:59
leppie6-Feb-06 0:59 
GeneralRe: p/invoke c++ classes with virtual functions Pin
mintguy6-Feb-06 22:06
mintguy6-Feb-06 22:06 
GeneralRe: p/invoke c++ classes with virtual functions Pin
leppie6-Feb-06 22:15
leppie6-Feb-06 22:15 
QuestionHow to use Pay Pal Pro [Urgent] Pin
Virendrak5-Feb-06 22:44
Virendrak5-Feb-06 22:44 
AnswerRe: How to use Pay Pal Pro [Urgent] Pin
exhaulted6-Feb-06 0:27
exhaulted6-Feb-06 0:27 

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.