|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
comparing values in ARRAYLISTSI have this bit of code working for arrays but cant get it working for arraylists The secone argument here (1) represents the second field in the row, with arraylists I get a message saying to many arguments. Can I do this with arraylists or do I need to copy the arraylists to arrays? Thanks For q As Integer = 0 To 9 For j As Integer = 0 To 9 If StrArray1(q, 1) = StrArray2(j, 1) Then count = count + 1 End If Next Next From http://www.developmentnow.com/g/38_0_0_0_0_0/dotnet-languages-vb.htm Posted via DevelopmentNow.com Groups http://www.developmentnow.com hi steve, in theory you could do an arraylist of arraylists.
but... I would think twice before implementing something like that, with quadratic complexity. Probably there are more efficient way to organize your class and data structures in order to avoid that. -tom steve ha scritto: Show quoteHide quote > I need to compare the value of a field in a row on an arraylist with the value of a field on a second arraylist > I have this bit of code working for arrays but cant get it working for arraylists > The secone argument here (1) represents the second field in the row, with arraylists I get a message saying to many arguments. > > Can I do this with arraylists or do I need to copy the arraylists to arrays? > > Thanks > For q As Integer = 0 To 9 > > For j As Integer = 0 To 9 > > > > If StrArray1(q, 1) = StrArray2(j, 1) Then > > count = count + 1 > End If > > Next > Next > > > From http://www.developmentnow.com/g/38_0_0_0_0_0/dotnet-languages-vb.htm > > Posted via DevelopmentNow.com Groups > http://www.developmentnow.com grazie, ma come?
From http://www.developmentnow.com/groups/viewthread.aspx?newsgroupid=38&threadid=797408
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
ah sei italiano :)
if you describe you original problem, perhaps I or other people here can be of help to reorganize your code. Keep in mind that multidimensional arrays are quite inefficient in .NET and they can be usually replaced with more efficient objects based on unidimensional collections. tommaso stefano ha scritto: Show quoteHide quote > grazie, ma come? > > From http://www.developmentnow.com/groups/viewthread.aspx?newsgroupid=38&threadid=797408 > > Posted via DevelopmentNow.com Groups > http://www.developmentnow.com
DataGrid custom class
How to create a local server (i.e., localhost) VB.NET Datagrid Sorting of Numbers For Each Loop in ASP.NET 2.0 VB.NET XML Documentor Exception HRESULT: 0x800401A8 in Excel with VB .Net Configuration File code error difference in Filestream + StreamWriter and just StreamWriter OFF TOPIC: IL DASM the MSIL disassebler Nested Loop |
|||||||||||||||||||||||