I have a string array and a list and data is like below,
string[] str = new string[2] { "Prod1", "Prod2" };
List<RegistryPathData> data = new List<RegistryPathData>
{
new RegistryPathData{AppName="test1", RegPath="Prod1|Version"},
new RegistryPathData{AppName="test2", RegPath="Prod2|Version"},
new RegistryPathData{AppName="test3", RegPath="Prod3|Version"},
new RegistryPathData{AppName="test4", RegPath="Prod4|Version"},
new RegistryPathData{AppName="test5", RegPath="Prod5|Version"},
};
Now I want to exclude items from List<RegistryPathData> which is NOT matching with string array (prod1 & prod2). Need to exclude below 2, how to do this?
new RegistryPathData{AppName="test1", RegPath="Prod1|Version"},
new RegistryPathData{AppName="test2", RegPath="Prod2|Version"},