i don't want to say:
(trsaz != v1) && (trsaz != v2) && ...
i want something like:
trsaz != (v1, v4, v7, v11)
Is this possible or is there also something else besides !=
.
var badList = new[] { v1, v4, v7, v11 };
var result = !badList.Contains(trsaz);
var excludeList = new[] { "v1", "v4", "v7", "v11" };
if(!excludeList.Contains(trsaz))
{
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With