I use the followings to check the array or List is Included a value:
string[] Names= { /* */};
string target = "";
if(Array.IndexOf(Names, target) > -1)
//Do
So is there any linq command to check it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do you mean a Linq method?
If so, there is one:
Note there is no need for any lambda here.