您的位置:首页 > 编程语言 > C#

c#字符串类型的入队、出队

2014-10-16 15:28 148 查看
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace ConsoleApplication1
{

class Program
{

static void Main(string[] args)
{
string[] s = { "12", "+CBF-", "Y%7*", "gdYudb/" };
Queue<string> q = new Queue<string>();
for (int i = 0; i < s.Length; i++)
{
q.Enqueue(s[i]);
}
string result = "";
while (q.Count > 0)
{
result += q.Dequeue();
}
Console.WriteLine(result);

Console.Read();
}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: