public frmShareFileSelection(BitChatNode node, SharedFile sharedFile) { InitializeComponent(); BitChat[] sharedChats = sharedFile.GetChatList(); foreach (BitChat chat in node.GetBitChatList()) { bool found = false; foreach (BitChat sharedChat in sharedChats) { if (sharedChat == chat) { found = true; break; } } if (!found) { checkedListBox1.Items.Add(chat); } } }