Click here to Skip to main content
15,922,512 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to get a list of file from folder?? Pin
Martin#14-Jun-07 19:36
Martin#14-Jun-07 19:36 
GeneralProblem solved Pin
Life as a Coder14-Jun-07 22:54
Life as a Coder14-Jun-07 22:54 
GeneralRe: Problem solved Pin
Martin#14-Jun-07 22:55
Martin#14-Jun-07 22:55 
Questionwindows service with exchange server 2003 Pin
RahulRoy36914-Jun-07 19:05
RahulRoy36914-Jun-07 19:05 
Questionproblem with List and FindAll() Pin
dfn14-Jun-07 17:59
dfn14-Jun-07 17:59 
AnswerRe: problem with List and FindAll() Pin
Christian Graus14-Jun-07 18:11
protectorChristian Graus14-Jun-07 18:11 
AnswerRe: problem with List and FindAll() Pin
Expert Coming14-Jun-07 18:14
Expert Coming14-Jun-07 18:14 
AnswerRe: problem with List and FindAll() Pin
dfn15-Jun-07 18:03
dfn15-Jun-07 18:03 
First, I apologize. My code was not correct, and I'm sure that added to the confusion.
Now, al is ArrayList al, and the reason I need al[0] is to see if two ArrayLists
contained in "allEntries" have the same value stored in index 0.

I have tried it when al[0] and al[1] contain the same values, and when they contain
different values. The result is the same, ie, in the anonymous function, al[0]
sometimes gives the values of al[1].

Here is my code again:


List<arraylist> allEntries = new List<arraylist>();

byte id0 = 0, id1 = 1;
byte sid1 = 16, sid2 = 88, sid3 = 100;

ArrayList entry1 = new ArrayList();
ArrayList entry2 = new ArrayList();
ArrayList entry3 = new ArrayList();

entry1.Add(id0);
entry1.Add(sid1);
entry1.Add("John");
entry1.Add("Doe");

entry2.Add(id1);
entry2.Add(sid2);
entry2.Add("Jane");
entry2.Add("Doe");

entry3.Add(id0); // notice index 0 of entry3 and entry1 contains id0
entry3.Add(sid3);
entry3.Add("Joe");
entry3.Add("Doe");

allEntries.Add(entry1);
allEntries.Add(entry2);
allEntries.Add(entry3);

for (byte i = 0; i < 2; i++)
{
List<arraylist> sameIdEntries = allEntries.FindAll(delegate(ArrayList al) { return((byte)al[0] == i); });
// do stuff
} // for


Any help is appreciated!
QuestionObjectDataSource ID Pin
Expert Coming14-Jun-07 17:43
Expert Coming14-Jun-07 17:43 
QuestionRe: ObjectDataSource ID Pin
RepliCrux14-Jun-07 19:10
RepliCrux14-Jun-07 19:10 
AnswerRe: ObjectDataSource ID Pin
Expert Coming14-Jun-07 19:13
Expert Coming14-Jun-07 19:13 
QuestionAutoSave change in databound comboBox Pin
Glen Harvy14-Jun-07 17:31
Glen Harvy14-Jun-07 17:31 
GeneralRe: AutoSave change in databound comboBox Pin
Martin#14-Jun-07 21:37
Martin#14-Jun-07 21:37 
Questionspecial characters are coming in XML output Pin
saymajum14-Jun-07 17:14
saymajum14-Jun-07 17:14 
AnswerRe: special characters are coming in XML output Pin
Christian Graus14-Jun-07 17:31
protectorChristian Graus14-Jun-07 17:31 
GeneralRe: special characters are coming in XML output Pin
saymajum14-Jun-07 19:24
saymajum14-Jun-07 19:24 
QuestionA qustion on Dll Call Pin
Xiaoming Qian14-Jun-07 15:16
Xiaoming Qian14-Jun-07 15:16 
AnswerRe: A qustion on Dll Call Pin
Tarakeshwar Reddy14-Jun-07 17:03
professionalTarakeshwar Reddy14-Jun-07 17:03 
GeneralRe: A qustion on Dll Call Pin
Xiaoming Qian14-Jun-07 20:41
Xiaoming Qian14-Jun-07 20:41 
Questionhow to put a Button Image into an array? Pin
Khoramdin14-Jun-07 14:38
Khoramdin14-Jun-07 14:38 
AnswerRe: how to put a Button Image into an array? Pin
alexey N14-Jun-07 18:44
alexey N14-Jun-07 18:44 
QuestionConvert Large Icons into Small???? Pin
classNoob14-Jun-07 13:29
classNoob14-Jun-07 13:29 
QuestionUsing your own classes in methods. Pin
jblouir14-Jun-07 12:32
jblouir14-Jun-07 12:32 
AnswerRe: Using your own classes in methods. Pin
Guffa14-Jun-07 12:55
Guffa14-Jun-07 12:55 
GeneralRe: Using your own classes in methods. Pin
jblouir14-Jun-07 13:05
jblouir14-Jun-07 13:05 

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.