comparing two arrays in C# | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

comparing two arrays in C#

I need to compare two int arrays to each other by comparing the first element in the first array to all the elements in the second array and then the same for each element in the first array. The size of each array is different every time the program runs. any suggestions?

3rd Sep 2018, 5:19 PM
David Aseltine
David Aseltine - avatar
1 Réponse
+ 2
use a nested for/foreach loop to iterate through both arrays and compare the elements one at a time.
3rd Sep 2018, 8:21 PM
hinanawi
hinanawi - avatar