public void addContactTag(ContactTag contactTag) { PhoneContactTags phoneContactTag = new PhoneContactTags(); phoneContactTag.contactTag = contactTag; phoneContactTag.phoneContact = this; this.contactTags.Add(phoneContactTag); }
public bool contactContainsTag(ContactTag contactTag) { if (contactTag == null) { return(false); } foreach (PhoneContactTags phoneContactTag in this.contactTags) { if (phoneContactTag.tagId == contactTag.id) { return(true); } } return(false); }