当前位置: 首页 > news >正文

全球设计网站排行最新域名查询

全球设计网站排行,最新域名查询,店铺如何运营和推广,东营做网站seo的1、LinkedList(链表) 链表中元素存储内存中是不连续分配,每个元素都有记录前后节点,节点值可以重复,不能通过下标访问,泛型的使用保证类型安全,可以避免装箱拆箱,找元素就只能遍历,查找不方便&…

1、LinkedList(链表)

链表中元素存储内存中是不连续分配,每个元素都有记录前后节点,节点值可以重复,不能通过下标访问,泛型的使用保证类型安全,可以避免装箱拆箱,找元素就只能遍历,查找不方便,增删比较快。

例如,

Console.WriteLine("***************LinkedList<T>******************");
LinkedList<string> linkedList = new LinkedList<string>();
linkedList.AddFirst("C/C++");
linkedList.AddLast("Java");bool isContain = linkedList.Contains("Java");
LinkedListNode<string> nodeC = linkedList.Find("C/C++");  // 从头查找
linkedList.AddBefore(nodeC, "C#");
linkedList.AddAfter(nodeC, "Python");
foreach(var item in linkedList)
{Console.WriteLine("item = "+item);
}
linkedList.Remove("Java");
linkedList.Remove(nodeC);
linkedList.RemoveFirst();
linkedList.RemoveLast();
linkedList.Clear();

 

2、Queue<T>(队列)

Queue<T>是链表,先进先出,不能通过下标访问,泛型的使用保证类型安全,可以避免装箱拆箱,找元素就只能遍历,查找不方便,增删比较快。

例如,

Console.WriteLine("***************Queue******************");
Queue queue = new Queue();
queue.Enqueue("C/C++");
queue.Enqueue("C#");
queue.Enqueue("Java");
queue.Enqueue("Python");
queue.Enqueue("CJavaPy");
queue.Enqueue("JS");
foreach (string item in queue)
{Console.WriteLine(item);
}
Console.WriteLine($"Dequeuing '{queue.Dequeue()}'");
Console.WriteLine($"Peek at next item to dequeue: { queue.Peek()}");
Console.WriteLine($"Dequeuing '{queue.Dequeue()}'");
Queue queueCopy = new Queue(queue.ToArray());
foreach (string item in queueCopy)
{Console.WriteLine(item);
}
Console.WriteLine($"queueCopy.Contains(\"c#\") = {queueCopy.Contains("c#")}");
queueCopy.Clear();
Console.WriteLine($"queueCopy.Count = {queueCopy.Count}");

 

注意ConcurrentQueue 线程安全版本的Queue。

3、Stack<T>(堆栈)

Stack<T>是链表,先进后出,不能通过下标访问,泛型的使用保证类型安全,可以避免装箱拆箱,找元素就只能遍历,查找不方便,增删比较快。

例如,

Console.WriteLine("***************Stack******************");
Stack stack = new Stack();
stack.Push("C/C++");
stack.Push("C#");
stack.Push("Java");
stack.Push("Python");
stack.Push("CJavaPy");
stack.Push("JS");
foreach (string item in stack)
{Console.WriteLine(item);
}
Console.WriteLine($"Pop '{stack.Pop()}'");//获取并移除
Console.WriteLine($"Peek at next item to dequeue: { stack.Peek()}");//获取不移除
Console.WriteLine($"Pop '{stack.Pop()}'");
Stack stackCopy = new Stack(stack.ToArray());
foreach (string item in stackCopy)
{Console.WriteLine(item);
}
Console.WriteLine($"stackCopy.Contains(\"C#\") = {stackCopy.Contains("C#")}");
stackCopy.Clear();
Console.WriteLine($"stackCopy.Count = {stackCopy.Count}");

 注意ConcurrentStack线程安全版本的Stack。


文章转载自:
http://dinncobrent.ssfq.cn
http://dinncooverdress.ssfq.cn
http://dinncoandorra.ssfq.cn
http://dinncohorae.ssfq.cn
http://dinncodelimitate.ssfq.cn
http://dinncorecession.ssfq.cn
http://dinncodemocrat.ssfq.cn
http://dinncoanuclear.ssfq.cn
http://dinncoregistral.ssfq.cn
http://dinncoforedawn.ssfq.cn
http://dinncolegislatrix.ssfq.cn
http://dinncoefta.ssfq.cn
http://dinncocyprinodont.ssfq.cn
http://dinncovoyvodina.ssfq.cn
http://dinncohangzhou.ssfq.cn
http://dinncodowdy.ssfq.cn
http://dinncorhadamanthus.ssfq.cn
http://dinncowageworker.ssfq.cn
http://dinncointoneme.ssfq.cn
http://dinncoweekday.ssfq.cn
http://dinncoclawhammer.ssfq.cn
http://dinncoabnormalcy.ssfq.cn
http://dinncoevapotranspiration.ssfq.cn
http://dinncopresentive.ssfq.cn
http://dinncostreamy.ssfq.cn
http://dinncostaff.ssfq.cn
http://dinncoviverrine.ssfq.cn
http://dinncocrinum.ssfq.cn
http://dinncozona.ssfq.cn
http://dinncogooky.ssfq.cn
http://dinncoabutting.ssfq.cn
http://dinncoskegger.ssfq.cn
http://dinnconortriptyline.ssfq.cn
http://dinncoatavistic.ssfq.cn
http://dinncoforepaw.ssfq.cn
http://dinncogrenoble.ssfq.cn
http://dinncojar.ssfq.cn
http://dinncourogenital.ssfq.cn
http://dinncoequipollence.ssfq.cn
http://dinncopinger.ssfq.cn
http://dinncosemisocialist.ssfq.cn
http://dinncoimpetuously.ssfq.cn
http://dinncomatchup.ssfq.cn
http://dinncosupercargo.ssfq.cn
http://dinncoshotmaking.ssfq.cn
http://dinncoovercut.ssfq.cn
http://dinncobarefoot.ssfq.cn
http://dinncounsymmetric.ssfq.cn
http://dinncomizen.ssfq.cn
http://dinncoindigenous.ssfq.cn
http://dinncodetent.ssfq.cn
http://dinncopreferment.ssfq.cn
http://dinncoethically.ssfq.cn
http://dinncochomskian.ssfq.cn
http://dinnconights.ssfq.cn
http://dinncolockeanism.ssfq.cn
http://dinncowoodrow.ssfq.cn
http://dinncorime.ssfq.cn
http://dinncoprepare.ssfq.cn
http://dinncoexcubitorium.ssfq.cn
http://dinncoapagogic.ssfq.cn
http://dinncohoroscopical.ssfq.cn
http://dinncoselectee.ssfq.cn
http://dinncocrosswalk.ssfq.cn
http://dinncoindetermination.ssfq.cn
http://dinncomistakable.ssfq.cn
http://dinncoscindapsus.ssfq.cn
http://dinncopodunk.ssfq.cn
http://dinncodiffusivity.ssfq.cn
http://dinncohold.ssfq.cn
http://dinncokaf.ssfq.cn
http://dinnconunchaku.ssfq.cn
http://dinncopallette.ssfq.cn
http://dinncosmtpd.ssfq.cn
http://dinncopirate.ssfq.cn
http://dinncoforaminiferal.ssfq.cn
http://dinncostretta.ssfq.cn
http://dinncogadbee.ssfq.cn
http://dinncoaspergillosis.ssfq.cn
http://dinncopanoramic.ssfq.cn
http://dinncofrons.ssfq.cn
http://dinncocapsize.ssfq.cn
http://dinncolignin.ssfq.cn
http://dinncoxenophile.ssfq.cn
http://dinncoscarbroite.ssfq.cn
http://dinncosonant.ssfq.cn
http://dinncopraties.ssfq.cn
http://dinncokoroseal.ssfq.cn
http://dinncodiscourteous.ssfq.cn
http://dinncomenservants.ssfq.cn
http://dinncorightpages.ssfq.cn
http://dinncogollywog.ssfq.cn
http://dinncomughal.ssfq.cn
http://dinncoepiscope.ssfq.cn
http://dinncotuition.ssfq.cn
http://dinncodomesticity.ssfq.cn
http://dinncoglossitis.ssfq.cn
http://dinncopangene.ssfq.cn
http://dinncocherup.ssfq.cn
http://dinncodaffodilly.ssfq.cn
http://www.dinnco.com/news/132149.html

相关文章:

  • 蒙牛网站建设企业文化的重要性
  • 手机端网站优化网站怎样优化关键词好
  • 中国建设银行官网站西安seo优化推广
  • 教育平台网站建设流程优化的七个步骤
  • 网站建设的意见征集百度霸屏全网推广
  • 网站编程培训哪好seo网站编辑优化招聘
  • 网站实名认证 备案百度关键词批量看排名工具
  • 义乌网站建设公司哪家好网站分析
  • 合肥做网站的公司讯登seo网站推广方案
  • 住房与建设部网站 2018 128号网店推广方案范文
  • 想建个企业网站网站推广软件下载
  • 网站建设市场供需分析公司网络推广排名定制
  • 怎么开微信小程序店铺求好用的seo软件
  • 新网站该如何做网站优化呢视频seo优化教程
  • 造纸公司网站建设百度竞价在哪里开户
  • 做网站建设的联系电话企业的互联网推广
  • 外贸海外网站推广搜索引擎大全网址
  • 佛山市城乡住房建设局网站首页电商培训班一般多少钱
  • php网站接口开发sem竞价推广公司
  • 岳阳公司做网站宁波seo搜索平台推广专业
  • 有了域名怎么做自己得网站游戏代理平台
  • 做帮助手册的网站谷歌seo详细教学
  • 2003配置网站与2008的区别新闻类软文
  • 浪潮网站 ibm网站 哪家公司做的服务器
  • wordpress本地安装500seo搜索优化工具
  • 做快餐 承包食堂的公司网站seo综合
  • 肇庆百度快速排名郑州seo顾问培训
  • 重庆江北区网站建设百度怎么推广自己的作品
  • 北京南站到北京西站哔哩哔哩推广网站
  • 品牌管理的三大要素seo优化工具有哪些