if (gardenvlist.Count() == getava.Count())
{
}
else if(oceanvlist.Count() == getava.Count())
{
}
else if (cityvlist.Count() == getava.Count())
{
}
<
If I understand your question correctly, you can pass in a lambda expression to Count()
to selectively count items based on properties then compare that to whatever you'd like. Something like this:
if (gardenvlist.Count()== getava.Count(x => x.Name == "GardenName"))
Note you will need to add the following using statement:
using System.Linq