How to do this?
int[] mas={1,2,3,4,...,n}
public var method1(mas)
{
var d = from i in Object where i.number==mas[0] || i.number==mas[1] || i.number==mas[2]|| ... || i.number==mas[n] select i;
return d;
}
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.
You will want to do something like this
Actually now that I think about that, that is going to return to you a list of i for every match.
You probably were looking for something more like
There’s probably a way to write this in pure LINQ but this is conceptually what you are trying to do