I have an array with these 3 items:
string[] departmentArray = {
"Warranty Service Representative",
"Warranty Service Administrative Manager",
"Warranty and Site Administrator"
};
and I have this string
var department = "Warranty Service Representative"
I have this condition that is suppose to test if the string department is not in the departmentArray
if (Array.Exists(departmentArray, element => element != department)){
}
Clearly the string is in the array, so it should return false, but this returns true for my string. What Am I doing wrong?
Any()may work.