Click here to Skip to main content
15,897,371 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionAssembly [modified] Pin
Garg, Deepak12-Jun-06 22:47
professionalGarg, Deepak12-Jun-06 22:47 
AnswerRe: Assembly Pin
Josh Smith13-Jun-06 4:58
Josh Smith13-Jun-06 4:58 
QuestionImporting address from an excel or text or csv file Pin
Jovito12-Jun-06 20:42
Jovito12-Jun-06 20:42 
AnswerRe: Importing address from an excel or text or csv file Pin
sasidar_d14-Jun-06 0:12
sasidar_d14-Jun-06 0:12 
QuestionGuide me... Pin
Resolver1812-Jun-06 19:07
Resolver1812-Jun-06 19:07 
Questionaspnet_wp and CLR Pin
Ritesh123412-Jun-06 18:31
Ritesh123412-Jun-06 18:31 
QuestionTERRIBLE PROBLEM : COM+ proxy and .Net framework 2.0 Pin
faviochilo12-Jun-06 11:20
faviochilo12-Jun-06 11:20 
QuestionItems Disappear from collection Pin
sseveran12-Jun-06 10:49
sseveran12-Jun-06 10:49 
So I have run into a serious problem that did not exist when I left work last week. I have items that are dissappearing from a collection as I iterate through it. I have a class called host which has a List<String> in it which has a list of Urls. There is only one way to get and remove urls, a property called NextUrl.

<br />
public string NextUrl<br />
{<br />
 get<br />
 {<br />
  string url;<br />
  lock (_urls)<br />
  {<br />
   url = _urls[0];<br />
   _urls.RemoveAt(0);<br />
   _lastTouched = DateTime.Now;  <br />
  }<br />
  return url;<br />
 }<br />
}


The loop is as follows
<br />
                foreach (Host h in currentList)<br />
                {<br />
                    if (h.Count > 0)<br />
                    {<br />
                        DownloadUrlAsync(h.NextUrl);<br />
                    }<br />
                }   <br />


currentList is a contains a List of hosts.

If I step though the code at both the if statement, the { and DownloadAsynucUrl items dissapear from the collection. I am not sure how this happens. By the time it gets to the NextUrl property there are no Urls left in the collection. When the program first hits the if statement there are 6. Has anyone seen anything like this? Am I crazy?

Thanks,

Steve
QuestionMigtration from framework 1.1 to 2.0 Pin
Arun Kumar Babu12-Jun-06 1:18
Arun Kumar Babu12-Jun-06 1:18 
AnswerRe: Migtration from framework 1.1 to 2.0 Pin
Guffa12-Jun-06 1:25
Guffa12-Jun-06 1:25 
GeneralRe: Migtration from framework 1.1 to 2.0 Pin
Arun Kumar Babu12-Jun-06 1:33
Arun Kumar Babu12-Jun-06 1:33 
AnswerRe: Migtration from framework 1.1 to 2.0 Pin
Jun Du12-Jun-06 5:34
Jun Du12-Jun-06 5:34 
GeneralMigtration from framework 1.1 to 2.0 Pin
Arun Kumar Babu13-Jun-06 1:25
Arun Kumar Babu13-Jun-06 1:25 
GeneralRe: Migtration from framework 1.1 to 2.0 Pin
Jun Du13-Jun-06 2:05
Jun Du13-Jun-06 2:05 
QuestionFile Downloading - Help Please Pin
Andrew Mercer12-Jun-06 0:16
Andrew Mercer12-Jun-06 0:16 
QuestionHow to maintain authentification for multiple http requests ? [modified] Pin
bumper11-Jun-06 23:15
bumper11-Jun-06 23:15 
QuestionRun .NET app programmatically [modified] Pin
#realJSOP11-Jun-06 10:24
professional#realJSOP11-Jun-06 10:24 
QuestionFrameWork on 486 Pin
Heinz_10-Jun-06 13:04
Heinz_10-Jun-06 13:04 
AnswerRe: FrameWork on 486 Pin
Jun Du10-Jun-06 14:07
Jun Du10-Jun-06 14:07 
QuestionFramework version Migration Pin
Crack110-Jun-06 1:52
Crack110-Jun-06 1:52 
AnswerRe: Framework version Migration Pin
Kevin McFarlane10-Jun-06 9:04
Kevin McFarlane10-Jun-06 9:04 
GeneralRe: Framework version Migration Pin
Crack111-Jun-06 23:59
Crack111-Jun-06 23:59 
GeneralRe: Framework version Migration Pin
Kevin McFarlane12-Jun-06 8:48
Kevin McFarlane12-Jun-06 8:48 
GeneralRe: Framework version Migration Pin
Kevin McFarlane12-Jun-06 22:50
Kevin McFarlane12-Jun-06 22:50 
QuestionHow do I persist a C++ pointer? Pin
dragon5210-Jun-06 0:54
dragon5210-Jun-06 0:54 

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.