Click here to Skip to main content
15,902,938 members
Home / Discussions / C#
   

C#

 
GeneralRe: Parameter is not valid. Pin
Jordanwb22-Apr-08 14:36
Jordanwb22-Apr-08 14:36 
GeneralCalculate a formula Pin
mehrdadc4822-Apr-08 9:24
mehrdadc4822-Apr-08 9:24 
GeneralRe: Calculate a formula Pin
Christian Graus22-Apr-08 12:04
protectorChristian Graus22-Apr-08 12:04 
GeneralRe: Calculate a formula Pin
Mitch F.22-Apr-08 12:09
Mitch F.22-Apr-08 12:09 
QuestionComparing two ArrayLists ? Pin
dennycrane22-Apr-08 8:58
dennycrane22-Apr-08 8:58 
GeneralRe: Comparing two ArrayLists ? Pin
User 665822-Apr-08 9:01
User 665822-Apr-08 9:01 
GeneralRe: Comparing two ArrayLists ? Pin
dennycrane22-Apr-08 9:06
dennycrane22-Apr-08 9:06 
GeneralRe: Comparing two ArrayLists ? [modified] Pin
User 665822-Apr-08 9:15
User 665822-Apr-08 9:15 
Do you want to compare them one by one, like this? =>

value0 = comapare(a1[0], a2[0]);
value1 = comapare(a1[1], a2[1]);
value2 = comapare(a1[2], a2[2]);
value3 = comapare(a1[3], a2[3]);


Then I would suggest you take a look at the Levenshtein Distance[^], which is a very good algorithm for comparing strings like used in spell checking programs or search engines.
You can find a very fast C# implementation here[^]

If you use .NET 2.0 then I'd also suggest you use generics, so you don't have to cast your objects to strings when accessing the list. Use List<string> instead Smile | :)

regards

modified on Tuesday, April 22, 2008 3:21 PM


modified 12-Sep-18 21:01pm.

GeneralRe: Comparing two ArrayLists ? Pin
dennycrane22-Apr-08 9:35
dennycrane22-Apr-08 9:35 
GeneralRe: Comparing two ArrayLists ? Pin
User 665822-Apr-08 9:49
User 665822-Apr-08 9:49 
GeneralRe: Comparing two ArrayLists ? Pin
Guffa22-Apr-08 10:43
Guffa22-Apr-08 10:43 
GeneralRe: Comparing two ArrayLists ? Pin
dennycrane22-Apr-08 10:57
dennycrane22-Apr-08 10:57 
GeneralRe: Comparing two ArrayLists ? Pin
Christian Graus22-Apr-08 12:06
protectorChristian Graus22-Apr-08 12:06 
GeneralRe: Comparing two ArrayLists ? Pin
Guffa22-Apr-08 12:12
Guffa22-Apr-08 12:12 
AnswerRe: Comparing two ArrayLists ? Pin
Judah Gabriel Himango22-Apr-08 11:52
sponsorJudah Gabriel Himango22-Apr-08 11:52 
GeneralRe: Comparing two ArrayLists ? Pin
dennycrane22-Apr-08 12:25
dennycrane22-Apr-08 12:25 
GeneralRe: Comparing two ArrayLists ? Pin
Judah Gabriel Himango22-Apr-08 18:55
sponsorJudah Gabriel Himango22-Apr-08 18:55 
GeneralRe: Comparing two ArrayLists ? Pin
Anthony Mushrow22-Apr-08 12:14
professionalAnthony Mushrow22-Apr-08 12:14 
GeneralRe: Comparing two ArrayLists ? Pin
dennycrane22-Apr-08 12:40
dennycrane22-Apr-08 12:40 
GeneralRe: Comparing two ArrayLists ? Pin
Anthony Mushrow22-Apr-08 12:44
professionalAnthony Mushrow22-Apr-08 12:44 
GeneralRe: Comparing two ArrayLists ? Pin
dennycrane22-Apr-08 12:55
dennycrane22-Apr-08 12:55 
GeneralRe: Comparing two ArrayLists ? Pin
Anthony Mushrow22-Apr-08 13:01
professionalAnthony Mushrow22-Apr-08 13:01 
GeneralRe: Comparing two ArrayLists ? Pin
Guffa22-Apr-08 13:16
Guffa22-Apr-08 13:16 
GeneralRe: Comparing two ArrayLists ? Pin
Anthony Mushrow22-Apr-08 13:24
professionalAnthony Mushrow22-Apr-08 13:24 
GeneralRe: Comparing two ArrayLists ? Pin
dennycrane22-Apr-08 13:39
dennycrane22-Apr-08 13:39 

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.