I have Generic list holding root objects means I have:
public class Component
{
}
public class DBComponent : Component
{
}
private List<Component> components;
I want to get a list with only the DBComponent references using Linq. means something like that :
List<DBComponent> dbComponents = components.FindAll(c => c is DBComponent);
However, it does not seems to work
Please can someone provide working Linq code?
Thanks
You’re looking for