Click here to Skip to main content
15,891,777 members
Home / Discussions / C#
   

C#

 
AnswerRe: What Type of Application to Choose Pin
PIEBALDconsult6-Jan-12 2:22
mvePIEBALDconsult6-Jan-12 2:22 
Questionhow to register the USB HID KEYBOARD for notification using c# in windows OS(xp,vista,SEVEN-- [for all--- 32 and 64 bit]) Pin
Member 85373615-Jan-12 17:05
Member 85373615-Jan-12 17:05 
QuestionHow can I restart an at runtime compiled project? Pin
absturz75-Jan-12 7:58
absturz75-Jan-12 7:58 
AnswerRe: How can I restart an at runtime compiled project? Pin
Luc Pattyn5-Jan-12 8:17
sitebuilderLuc Pattyn5-Jan-12 8:17 
GeneralRe: How can I restart an at runtime compiled project? Pin
absturz75-Jan-12 12:04
absturz75-Jan-12 12:04 
AnswerRe: How can I restart an at runtime compiled project? Pin
Luc Pattyn5-Jan-12 12:15
sitebuilderLuc Pattyn5-Jan-12 12:15 
GeneralRe: How can I restart an at runtime compiled project? Pin
absturz75-Jan-12 12:20
absturz75-Jan-12 12:20 
Questionhow to delete a string[] from list<string[]> ??? Pin
JANARDHAN GURRAM5-Jan-12 7:02
JANARDHAN GURRAM5-Jan-12 7:02 
AnswerRe: how to delete a string[] from list ??? Pin
manognya kota5-Jan-12 7:23
manognya kota5-Jan-12 7:23 
GeneralRe: how to delete a string[] from list ???<solved> Pin
JANARDHAN GURRAM5-Jan-12 7:48
JANARDHAN GURRAM5-Jan-12 7:48 
GeneralRe: how to delete a string[] from list ??? Pin
manognya kota5-Jan-12 7:51
manognya kota5-Jan-12 7:51 
GeneralRe: how to delete a string[] from list ??? Pin
BillWoodruff5-Jan-12 16:24
professionalBillWoodruff5-Jan-12 16:24 
GeneralRe: how to delete a string[] from list ??? Pin
manognya kota5-Jan-12 17:47
manognya kota5-Jan-12 17:47 
AnswerRe: how to delete a string[] from list ??? Pin
Luc Pattyn5-Jan-12 7:59
sitebuilderLuc Pattyn5-Jan-12 7:59 
You can't remove using dataArray.Remove(new string[] { "start2","end2" }); as that new array isn't the same as the original one.

However I see three ways, each taking some additional code:

1.
keep a reference to the item you will want to remove later on:
...
string[] toBeDeletedLater=new string[] { "start2","end2" };
dataArray.Add(toBeDeletedLater);
...
dataArray.Remove(toBeDeletedLater);


2.
remember the index in the list, then use RemoveAt()
int toBeDeletedLater=dataArray.Count;
dataArray.Add(new string[] { "start2","end2" });
...
dataArray.RemoveAt(toBeDeletedLater);

This will fail if other list operations cause the indexes to change...

3.
locate the element you want to delete (worst case: iterate and check the content of each element), then call RemoveAt.

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

QuestionMessage Removed Pin
5-Jan-12 5:52
professionalN_tro_P5-Jan-12 5:52 
AnswerRe: Interfaces and Collections Pin
Sentenryu5-Jan-12 6:41
Sentenryu5-Jan-12 6:41 
GeneralMessage Removed Pin
5-Jan-12 6:53
professionalN_tro_P5-Jan-12 6:53 
GeneralRe: Interfaces and Collections Pin
Sentenryu5-Jan-12 7:11
Sentenryu5-Jan-12 7:11 
AnswerRe: Interfaces and Collections Pin
SledgeHammer015-Jan-12 10:38
SledgeHammer015-Jan-12 10:38 
QuestionRe: Interfaces and Collections Pin
Sentenryu5-Jan-12 10:48
Sentenryu5-Jan-12 10:48 
GeneralRe: Interfaces and Collections Pin
BillWoodruff5-Jan-12 16:46
professionalBillWoodruff5-Jan-12 16:46 
GeneralRe: Interfaces and Collections Pin
SledgeHammer015-Jan-12 16:59
SledgeHammer015-Jan-12 16:59 
AnswerRe: Interfaces and Collections Pin
BillWoodruff5-Jan-12 16:44
professionalBillWoodruff5-Jan-12 16:44 
GeneralRe: Interfaces and Collections Pin
SledgeHammer015-Jan-12 16:54
SledgeHammer015-Jan-12 16:54 
GeneralRe: Interfaces and Collections Pin
Sentenryu5-Jan-12 22:13
Sentenryu5-Jan-12 22: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.