I have 2 collections, one of available features and one of user features. I would like to delete an item in the available features that contain the featurecode in the other collection but can't find the right syntax.
I've included my current code that doesn't compile (it's complaining that I can't use the "==" operator, my Linq knowledge is minimal)
Is Linq the best way to do this? Any help would be appreciated.
AvailableFeatureViewListClass availableFeatures = (AvailableFeatureViewListClass)uxAvailableList.ItemsSource;
UserFeatureListClass userFeatures = (UserFeatureListClass)uxUserFeatureList.ItemsSource;
foreach (UserFeatureClass feature in userFeatures)
{
availableFeatures.Remove(availableFeatures.First(FeatureCode => FeatureCode == feature.FeatureCode));
}