Hey all, looking to reduce the code on my c# if statements as there are several repeating factors and was wondering if a trimmer solution is possible.
I currently have 2
How about maybe something like this?
var condCheck1 = new string[]{"a","b","c"}; var condCheck2 = new string[]{"a","b","c","A2"} if(!condCheck1.Contains(columnName) && !checkbox.checked) //statement 1 else if (!condCheck2.Contains(columnName)) //statment 2