title: Pass int array in where clause of LINQ Query
body: <p>There is a class </p>
  
  <pre><code>Public class Student
  {
    int id;
    int rollNum;
    String Name;
  }
  </code></pre>
  
  <p>a method </p>
  
  <pre><code>Public List&lt;Student&gt; GetAllStudents()
  {
    var studentList = GetMeAll(); // Simple select * query to get all students
    //unfortunately i can't make changes in this method so have to write a linq query to       //filter data.
    //getting int array ids correctly from some method
     var filterList = FilterStudentsByID(ids,StudentList);
  }
  </code></pre>
  
  <p>I want to write a method that takes an int array as input and returns a List</p>
  
  <pre><code>Public List&lt;Student&gt; FilterStudentsByID(int[] ids,List&lt;student&gt; studentList)
  {
    //There should be a linq query , but I am new to linq so don't know how to write this.
    Var list = from  studentList in ..... don't know much;
  }
  </code></pre>
  
  <p>Any help in writing the query. Thank you all for Answers, I am also looking for maintain the performances  with large list of records ?? It will be great if you can add me simple explanation of the query will work internally ??</p>