Current behavior: Error Message Value Cannot be Null
Screenshot:
i’m trying to read list of unread messages using outlook mail activity and storing the attachment names in List of Strings (lstattachment) , certain times mail may not have attachments that time when i try to read the lstattachment.Any() it throws error message Value cannot be null , how do i check lstattachment is null or empty , i hope empty can be checked using listattachment.count > 0
logics i tried :
1 ) Nothing <> lstattachment
2) IsNotNothing (lstattachment) AND lstattachment.Any()
If it is list you can do one thing try this list.count this will count if is !0 then items are exist in list else no items in list means list is empty
like this
@velanchandru you are using one list variable right are you initialized that variable like this
list = new list(of strings) if you initialized the list then count function will work try like this once