获取元素的内部队列C#索引队列、索引、元素

由网友(范爷)分享简介:我有一个用户队列(电子邮件字符串)一个在C#中,我想在此队列中向用户发送了他的位置。I have a queue of users(string of emails) a in c# and I want to send the user his location in this queue.像; Queue q...

我有一个用户队列(电子邮件字符串)一个在C#中,我想在此队列中向用户发送了他的位置。

I have a queue of users(string of emails) a in c# and I want to send the user his location in this queue.

像;

Queue q = new Queue(32);

q.Enqueue(Session["email"].ToString());

    queue.IndexOf(email);

任何想法?

感谢

推荐答案

也许列表阵列会对这样的行为更好,但你可以尝试这样的:

Maybe a List or an Array would be better for such actions but you could try this:

queue.ToArray().ToList().IndexOf(email);
阅读全文

相关推荐

最新文章