Would it be possible to combine all the given code to linq, which then would return 'true' or 'false'? Or is this fine the way it is?
If it is possible, would there be a significant performance difference?(The array and list won't contain more than 100 elements)
foreach (var item in myArray)
{
if (myList.Exists(x => x.Value == item))
{
amountTrue++;
}
}
if (myArray.Count() == amountTrue)
{
isValid = true;
}