Hi,
I have a List values = new List();
values.add("0");This
values.add("1");
values.add("9)";
Only values 0 and 9 are valid so therefore I must check if the list above has values that are different from the values 0 and 9. I need help with that from someone that is experienced in C#.
I have tried with this;
This if statement will always be true because I only check for 0 and 9.
if (values.ContainshT("0") && values.Contains("9"))
This if statement will also be true because there is an item that is different from 0 and 9.
if (!values.ContainshT("0") && !values.Contains("9"))
How to check if items exist other than 0 and 9 it is false and if only items 0 and 9 exist then it is true.
Nitin SontakkePosted Jan 23, 2021, 4:59 AM
Sachin SinghPosted Jan 23, 2021, 9:49 AM
Sachin SinghPosted Jan 23, 2021, 5:00 AM