title: How to retrieve if an item in a CheckedListBox is checked or not? Winforms C#
body: <p>I have a <code>foreach()</code> statement running through all items inside a <code>CheckedListBox</code>. </p>
  
  <p><strong>How can I know if a item is or not checked?</strong> </p>
  
  <p>If useful here's the code:</p>
  
  <pre><code>foreach (object user in checkedListBoxUsersWhoSee.Items)
  {
      // Privileged = if the user is checked he has privileges;
      alias = user.ToString().Substring(user.ToString().Length - 3);
      SelectUserID = new SqlCommand(Properties.Resources.SelectUserID + alias, TeamPWSecureBD);
      userIDAuth = (int)SelectUserID.ExecuteScalar();
  
      InsertAuths.Parameters.AddWithValue("@idPass", idPass);
      InsertAuths.Parameters.AddWithValue("@idUser", userIDAuth);
      InsertAuths.Parameters.AddWithValue("@Privileged", idPass);
  
      //Code not finished
  }
  </code></pre>