I have an array with these three elements:
string[] departmentArray = {
"Warranty Service Representative",
"Warranty Service Administrative Manager",
"Warranty and Site Administrator"
};
and i have this line
var department = "Warranty Service Representative"
I have this condition, which, suppose, is to check if there is a string department in departmentArray
if (Array.Exists(departmentArray, element => element != department)){
}
Obviously, the string is in an array, so it should return false, but this returns true for my string. What am I doing wrong?
source
share