How can I check a potential new record against existing records in a list?
I have this code.
I was thinking something a long the lines of a Boolean variable that has a Linq expression that will return true if my query returns true.
I have this code.
vbNET Code:
Public Structure EmailDetails Private _ItemID As ItemId Private _from As String Private _subject As String Private _attachments As List(Of Attachment) Public Sub New(ByVal itemID As ItemId, ByVal mFrom As String, ByVal subject As String, ByVal attachments As List(Of Attachment)) _ItemID = itemID _from = mFrom _subject = subject _attachments = attachments End Sub End Structure Private _emailDetails As New List(Of EmailDetails) Public Sub OnAttachmentsFound(ByRef item As Item, ByRef mFrom As String) Handles Me.AttachmentsFound _emailDetails.Add(New EmailDetails(item.Id, mFrom, item.Subject, item.Attachments.ToList)) End Sub
I was thinking something a long the lines of a Boolean variable that has a Linq expression that will return true if my query returns true.