title: Where IN clause in LINQ
body: <p>How to make a where in clause similar to one in SQL Server?</p>
  
  <p>I made one by myself but can anyone please improve this?</p>
  
  <pre><code>    public List&lt;State&gt; Wherein(string listofcountrycodes)
      {
          string[] countrycode = null;
          countrycode = listofcountrycodes.Split(',');
          List&lt;State&gt; statelist = new List&lt;State&gt;();
  
          for (int i = 0; i &lt; countrycode.Length; i++)
          {
              _states.AddRange(
                   from states in _objdatasources.StateList()
                   where states.CountryCode == countrycode[i].ToString()
                   select new State
                   {
                      StateName  = states.StateName                    
  
                   });
          }
          return _states;
      }
  </code></pre>