private void checkedListBoxTags_Leave(object sender, EventArgs e) { String tags = ""; foreach (object item in this.checkedListBoxTags.CheckedItems) { if (tags.Length > 0) { tags += "|"; } tags += item.ToString(); } KopsikApi.kopsik_set_time_entry_tags(KopsikApi.ctx, this.getUTF8String(timeEntry.GUID), this.getUTF8String(tags)); }