Queueitems.Where(function(x) x.Reference.Equals("Whtever you want to check")).Count > 0 will give if any reference is matching or not in given Ienumerable queue items reference
You can’t convert IEnumerable[QueueItem] into a string. When you say the value of Reference, do you mean the Reference column you see in the Orchestrator Queue, or do you mean you have a name/value pair (with name “Reference”) inside the queue items?
If you want the actual built-in queue item Reference that you see in Orchestrator, you get it this way…
yourQueueItemVar.Reference
So if you’re looping through an IEnumerable[QueueItem] and need to check each queue item, using pCurrentQueueItem as the loop variable, then it’s just pCurrentQueueItem.Reference
If you’re talking about a value within the queue item, that is coincidentally named Reference, then you’d do pCurrentQueueItem.SpecificContent(“Reference”).ToString