InternalRemoveContactPicture method

void InternalRemoveContactPicture()
Removes the picture from local attachment collection.

Implementation

/* private */
void InternalRemoveContactPicture() {
  // Iterates in reverse order to remove file attachments that have IsContactPhoto set to true.
  for (int index = Attachments.Count - 1; index >= 0; index--) {
    FileAttachment fileAttachment = Attachments[index] as FileAttachment;
    if (fileAttachment.IsContactPhoto!) {
      Attachments.Remove(fileAttachment);
    }
  }
}