Orginnally I had a BlockingCollection
BlockingCollection<ChannelResource> ChannelQueue = new BlockingCollection<ChannelResource>();
I added the items to it.
ChannelResource ChanResource = TelephonyServer.GetChannel();
MyApplication.ChannelQueue.TryAdd(ChanResource);
Now I find that each ChannelResource has a corresponding string, so I want to add ChannelResource object with the string together to the BlockingCollection.
How? Merge the object ChannelResource and the string to form an anonymous type?
EDIT:
I mean do I have to redifine the BlockingCollection as
BlockingCollection<T> ChannelQueue = new BlockingCollection<T>();
And T contains ChannelResource
and string
together?