title: Datatable Select rows using 'IN' clause C#.net
body: <pre><code>string selectedLeaveTypes = "";
    foreach (ListItem item in chkLeaveType.Items)
        {
           if (item.Selected)
           {
            selectedLeaveTypes = selectedLeaveTypes + "'" + item.Value + "',";
           }
        }
   selectedLeaveTypes = "(" +selectedLeaveTypes+ ")";
  
   DataRow[] rows = dt.Select("LeaveType IN '" + selectedLeaveTypes + "'");
  </code></pre>
  
  <p>Syntax error: <strong>The items following the IN keyword must be separated by commas and be enclosed in parentheses.</strong></p>