Click here to Skip to main content
15,923,083 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to process calls to a Control on a separate thread? Pin
Luc Pattyn13-Sep-07 1:10
sitebuilderLuc Pattyn13-Sep-07 1:10 
QuestionDatabase retrieving problem Pin
Nishad8512-Sep-07 20:59
Nishad8512-Sep-07 20:59 
AnswerRe: Database retrieving problem Pin
Paul Conrad14-Sep-07 19:05
professionalPaul Conrad14-Sep-07 19:05 
Questioninstance of object in a class Pin
bluetx12-Sep-07 20:58
bluetx12-Sep-07 20:58 
AnswerRe: instance of object in a class Pin
pmarfleet12-Sep-07 21:45
pmarfleet12-Sep-07 21:45 
AnswerRe: instance of object in a class Pin
Parwej Ahamad12-Sep-07 21:52
professionalParwej Ahamad12-Sep-07 21:52 
QuestionDataGridView SelectionBackColor and Transparency Problem Pin
mertkan6512-Sep-07 20:55
mertkan6512-Sep-07 20:55 
QuestionUse managed DLL in unmanaged and managed environment Pin
mpavas12-Sep-07 20:08
mpavas12-Sep-07 20:08 
AnswerRe: Use managed DLL in unmanaged and managed environment Pin
Parwej Ahamad12-Sep-07 20:29
professionalParwej Ahamad12-Sep-07 20:29 
GeneralRe: Use managed DLL in unmanaged and managed environment Pin
mpavas12-Sep-07 21:01
mpavas12-Sep-07 21:01 
QuestionWindows Services Pin
Elizma12-Sep-07 19:50
Elizma12-Sep-07 19:50 
AnswerRe: Windows Services Pin
Parwej Ahamad12-Sep-07 20:36
professionalParwej Ahamad12-Sep-07 20:36 
QuestionDatagridview Pin
iet200012-Sep-07 19:37
iet200012-Sep-07 19:37 
AnswerRe: Datagridview Pin
Parwej Ahamad12-Sep-07 20:19
professionalParwej Ahamad12-Sep-07 20:19 
AnswerRe: Datagridview Pin
C#Coudou12-Sep-07 20:20
C#Coudou12-Sep-07 20:20 
QuestionXML and Generic List Pin
satyaki mishra12-Sep-07 19:25
satyaki mishra12-Sep-07 19:25 
AnswerRe: XML and Generic List Pin
Pete O'Hanlon12-Sep-07 21:59
mvePete O'Hanlon12-Sep-07 21:59 
Question[C#] PageBreak in Excel Pin
kurisutofuJP12-Sep-07 19:22
kurisutofuJP12-Sep-07 19:22 
QuestionGet Value of Arbitrary ListBox Item Pin
Sukhjinder_K12-Sep-07 18:55
Sukhjinder_K12-Sep-07 18:55 
AnswerRe: Get Value of Arbitrary ListBox Item Pin
Pete O'Hanlon12-Sep-07 22:12
mvePete O'Hanlon12-Sep-07 22:12 
GeneralRe: Get Value of Arbitrary ListBox Item Pin
Sukhjinder_K12-Sep-07 22:29
Sukhjinder_K12-Sep-07 22:29 
GeneralRe: Get Value of Arbitrary ListBox Item Pin
Pete O'Hanlon12-Sep-07 22:39
mvePete O'Hanlon12-Sep-07 22:39 
GeneralSET Value of Arbitrary ListBox Item Pin
Sukhjinder_K12-Sep-07 23:33
Sukhjinder_K12-Sep-07 23:33 
Sorry about confusing anybody. Here is what I want

My Playlist is displayed in ListBox named list
with contents
1. SongABc
2. Song Dev
3. Vid34
4. Clip5
5. ABC and so on

I need to delete an item from that
for that I'm doing

this.list.Items.RemoveAt(index);

Now I need to update the IndexNumber of each entry in the Playlist so that after deleting "Vid34"

My list shows

1. SongABc
2. Song Dev
3. Clip5
4. ABC and so on

I can READ ALL items of list as
IEnumerator enm = this.list.Items.GetEnumerator();

int i = 0;
for(i = 0; i < index; i ++ )
enm.MoveNext();

//Now I'm at the place where I Delete the Entry
//all the Following Items need to update their Numerical Index Decremented by one
for(i = index; i < list.Items.Count; i ++)
{
String entry = enm.Current.ToString();
String newVal = getNewVal(entry); // Strip Index Value so that "4. Clip5 becomes just Clip5"

//Here I need to set the Current Entry with new Val something like

this.list.itemAt(i) = newVal; // But no such method exists
neither can I do
enm.Current = newVal; // Because it is a readonly property
}

I can clear my playlist and readd everything but that would be waste of resources
GeneralRe: SET Value of Arbitrary ListBox Item Pin
Pete O'Hanlon12-Sep-07 23:55
mvePete O'Hanlon12-Sep-07 23:55 
GeneralRe: SET Value of Arbitrary ListBox Item Pin
Sukhjinder_K13-Sep-07 0:13
Sukhjinder_K13-Sep-07 0:13 

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.