title: Check if specific data exist in a DataTable
body: <p>Suppose I have 2 DataTables, DSALL and DSSome for storing student information</p>
  
  <p><strong>DSALL</strong> (Store all student information)</p>
  
  <blockquote>
    <p>SID (PK)<br>
    Name<br>
    Address<br>
    Telephone<br> ...</p>
  </blockquote>
  
  <p><strong>DSSome</strong> (Store only SID for some specific students)</p>
  
  <blockquote>
    <p>SID (Unique)</p>
  </blockquote>
  
  <p>Now I want a C# function to check if all SID in DSSome exist in DSALL. The function return true if all SID exist in DSALL, return false if otherwise.</p>
  
  <p>The traditional way is </p>
  
  <pre><code>protected bool checkSID(DataTable DSALL, DataTable DSSome){  
    for (int i=0; i&lt;DSSome.Rows.Count; i++){
      bool isFound = false;
      string SID = DSSome.Rows[i]["SID"].ToString();
      for (int j=0; j&lt;DSALL.Rows.Count; j++){
        string _SID = DSALL.Rows[j]["SID"].ToString();
        if (SID == _SID) { isFound = true; break; }
      }
      if (!isFound) return false;
    }
    return true;
  }
  </code></pre>
  
  <p>Is there any other simpler way of efficient way to solve this problem? </p>