I have two objects.
public class GlobalSettings
{
public bool A { get; set; }
public bool B { get; set; }
public bool C { get; set; }
public bool D { get; set; }
}
public class UserSettings
{
public bool A { get; set; }
public bool B { get; set; }
public bool C { get; set; }
public bool D { get; set; }
}
I need to compare these two objects. Depend on the property values of GlobalSettings
i need to remove the property from UserSettings
.
For eg.
From GlobalSettings
property A
value is false
means i want to remove that property from UserSettings
. Then i need to remove propery A
from UserSettings
like below.
public class UserSettings
{
public bool B { get; set; }
public bool C { get; set; }
public bool D { get; set; }
}
Is it possible to do this linq
?