单项选择题
您正在开发的应用程序使用的队列名为MyQueue的类对象。此队列的类对象将用于存储在应用程序运行时,用户发送的消息。您正在开发的应用程序的管理员和用户界面创建消息报告提供了一个接口。要确保管理员选择重置选项时删除MyQueue对象中存储的所有用户消息。你应该做什么?()
A.使用MyQueue对象Enqueue方法。
B.使用MyQueue对象的Clear方法。
C.使用MyQueue对象的Dequeue方法。
D.使用TrimToSize方法的MyQueue对象
点击查看答案
相关考题
-
单项选择题
Youarecreatinganundobufferthatstoresdatamodifications.Youneedtoensurethattheundofunctionalityundoesthemostrecentdatamodificationsfirst.Youalsoneedtoensurethattheundobufferpermitsthestorageofstringsonly.Whichcodesegmentshouldyouuse?()
A.Stack<string> undoBuffer=new Stack<string>();
B.Stack undoBuffer=new Stack();
C.Queue<string> undoBuffer=new Queue <string>();
D.Queue undoBuffer=new Queue(); -
多项选择题
Certkiller.com 已指示您可以创建一个名为 MetricFormula 的类。此类将用于 MetricUnit 和 EnglishUnit 的对象进行比较。MetricFormula 是当前定义,如下所示 (行号只供参考用):1. public class MetricFormula2. {3.4. }您需要确保 MetricFormula 类可用于将所需的对象进行比较。你应该做什么?()
A.
B.
C.
D. -
单项选择题
你在 Certkiller .com做应用程序的开发工作。,Certkiller.com 希望可以开发一个应用程序存储和独特的帐号的方式检索客户端的信息。您创建的自定义集合类,该类实现 IDictionary 接口,名为ClientDictionary。下面的代码已纳入新的应用程序。//Create 客户端对象Client c1 = new Client ("AReid", "Andy Reid", Status.Current); Client c2 = new Client ("DAustin", "Dean Austin", Status.New); //Create ClientDictionary objectIDictionary cData = new ClientDictionary ();cData.Add ("10001", c1);cData.Add ("10002", c2);您可以使用相同的方法将其他客户端对象添加到集合。您需要确保您能够检索与帐号 10111 相关联的客户信息。你应该做什么?()
A.
B.
C.
D.
