title: How can I work with the Tag property of a winforms checked listbox item?
body: <p>How can I write a C# winforms code like this?</p>
  
  <p>CheckedListBox items don't have 'Tag' and 'ValueMember' properties.</p>
  
  <p>I know there are many alternatives to this. But I need to work it this way.</p>
  
  <pre><code>private void LoadPermissionsToCheckedListBox()
  {
      Role selectedRole = (Role)comboBox1.SelectedItem;
  
      int i = 0;
      foreach (Permission p in selectedRole.PermissionItems)
      {
          checkedListBox1.Items.Add(p);
          checkedListBox1.Items[i].Tag = p;
      }
  
      checkedListBox1.DisplayMember = "PermissionKey";
      checkedListBox1.ValueMember = "PermissionID";
  }
  </code></pre>