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

C#

 
NewsRe: Convert xml file into MS Word2007 using a xsl file Pin
CodingLover13-Aug-08 21:09
CodingLover13-Aug-08 21:09 
QuestionLocation of HTMLControl on webpage when displayed on Webbrowser control Pin
rajesh992213-Aug-08 19:02
rajesh992213-Aug-08 19:02 
QuestionReading data from XML and writing into DataGridView Pin
Piyush Vaishnav13-Aug-08 17:59
Piyush Vaishnav13-Aug-08 17:59 
AnswerRe: Reading data from XML and writing into DataGridView Pin
dan!sh 13-Aug-08 18:44
professional dan!sh 13-Aug-08 18:44 
Questionforeach loop not working properly Pin
CodingLover13-Aug-08 17:23
CodingLover13-Aug-08 17:23 
AnswerRe: foreach loop not working properly Pin
Christian Graus13-Aug-08 18:02
protectorChristian Graus13-Aug-08 18:02 
QuestionRe: foreach loop not working properly Pin
CodingLover13-Aug-08 18:12
CodingLover13-Aug-08 18:12 
AnswerRe: foreach loop not working properly Pin
Christian Graus13-Aug-08 18:49
protectorChristian Graus13-Aug-08 18:49 
I would imagine if you can get a collection of selected items, and then find the index of each item so you delete that, that will solve your issue. I'd make a copy of it first too, because removing items can cause the selections to be lost, I believe.

The other way is to take the collection of selected indices, and sort if in reverse order, I believe there's sort functions built in for that. You could iterate over such a collection easy enough. Or you could even make a copy and pull indices from the tail end instead of using for each which starts at the front

Christian Graus

No longer a Microsoft MVP, but still happy to answer your questions.

GeneralRe: foreach loop not working properly Pin
CodingLover13-Aug-08 19:09
CodingLover13-Aug-08 19:09 
AnswerRe: foreach loop not working properly Pin
Andriy Protskiv13-Aug-08 19:00
Andriy Protskiv13-Aug-08 19:00 
GeneralRe: foreach loop not working properly Pin
Mark Salsbery14-Aug-08 5:38
Mark Salsbery14-Aug-08 5:38 
GeneralRe: foreach loop not working properly Pin
Andriy Protskiv14-Aug-08 6:02
Andriy Protskiv14-Aug-08 6:02 
AnswerRe: foreach loop not working properly Pin
N a v a n e e t h13-Aug-08 19:42
N a v a n e e t h13-Aug-08 19:42 
GeneralRe: foreach loop not working properly Pin
Christian Graus13-Aug-08 20:51
protectorChristian Graus13-Aug-08 20:51 
GeneralRe: foreach loop not working properly Pin
N a v a n e e t h13-Aug-08 21:05
N a v a n e e t h13-Aug-08 21:05 
JokeRe: foreach loop not working properly Pin
PIEBALDconsult14-Aug-08 5:52
mvePIEBALDconsult14-Aug-08 5:52 
GeneralVB globals Pin
Mycroft Holmes13-Aug-08 16:08
professionalMycroft Holmes13-Aug-08 16:08 
GeneralRe: VB globals Pin
PIEBALDconsult13-Aug-08 16:39
mvePIEBALDconsult13-Aug-08 16:39 
QuestionHelp with Trimming String Array Please! Pin
Arcdigital13-Aug-08 15:54
Arcdigital13-Aug-08 15:54 
AnswerRe: Help with Trimming String Array Please! Pin
Christian Graus13-Aug-08 16:10
protectorChristian Graus13-Aug-08 16:10 
AnswerRe: Help with Trimming String Array Please! Pin
N a v a n e e t h13-Aug-08 20:04
N a v a n e e t h13-Aug-08 20:04 
QuestionRe: Help with Trimming String Array Please! Pin
Arcdigital14-Aug-08 2:27
Arcdigital14-Aug-08 2:27 
QuestionPDF Library Pin
gscheek13-Aug-08 14:50
gscheek13-Aug-08 14:50 
AnswerRe: PDF Library Pin
Christian Graus13-Aug-08 16:11
protectorChristian Graus13-Aug-08 16:11 
GeneralRe: PDF Library Pin
gscheek14-Aug-08 7:36
gscheek14-Aug-08 7:36 

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.