单项选择题
You work as the application developer at Certkiller .com. Certkiller .com uses Visual Studio.NET 2005 as its application development platform.You are developing a .NET Framework 2.0 application used to store a type-safe list of names and e-mail addresses. The list will be populated all at ones from the sorted data which means you well not always need to perform insertion or deletion operations on the data. You are required to choose a data structure that optimizes memory use and has good performance.What should you do?()
A. The System.Collections.Generic.SortedList class should be used
B. The System.Collections.HashTable class should be used
C. The System.Collections.Generic.SortedDictionary class should be used
D. The System.Collections.SortedList class should be used
相关考题
-
单项选择题
YouworkasanapplicationdeveloperatCertkiller.com.YouhaverecentlycreatedacustomcollectionclassnamedShoppingListforalocalsupermarket.ThiscustomclasswillincludeShoppinItemobjectsthathavethepublicpropertieslistedbelow.*Name*AisleNumber*OnDiscountYouarerequiredtoenableusersofyourclasstoiteratethroughtheShoppingListcollection,andtolisteachproductnameandaislenumberusingtheforeachstatement.Youneedtoachievethisbydeclaringtheappropriatecode.Whatcodeshouldyouuse?()
A. public class ShoppingList : ICollection {// Class implementation }
B. public class ShoppingList : IEnumerator, IEnumerable {// Class implementation }
C. public class ShoppingList : Ilist {// Class implementation }
D. public class ShoppingList : Enum {// Class implementation } -
单项选择题
YouworkastheapplicationdeveloperatCertkiller.com.Certkiller.comusesVisualStudio.NET2005asitsapplicationdevelopmentplatform.YouhaverecentlyfinisheddevelopmentofaclassnamedTestRewardandpackagetheclassina.NET2.0assemblynamedTestObj.dll.Afteryoushiptheassemblyanditisusedbyclientapplications,youdecidetomovetheTestRewardclassfromTestObj.dllassemblytotheTestRewardObj.dllAssembly.YouaretoensurewhenyoushiptheupdatedTestObj.dllandTestRewardObj.dllassembliesthattheclientapplicationscontinuetoworkanddonotrequirerecompiling.Whatshouldyoudo?()
A. The TypeForwardedTo attribute should be used
B. The TypeConvertor.ConvertTo method should be used
C. The InternalsVisibleTo attribute should be used
D. The Type Convertor.ConvertFrom method should be used -
单项选择题
YouworkasanapplicationdeveloperatCertkiller.com.YouarecurrentlyintheprocessofcreatingaclassthatstoresdataaboutCertkiller.com’scustomers.Certkiller.comcustomersareassigneduniqueidentifiersandvariouscharacteristicsthatmayincludealiases,shippinginstructions,andsalescomments.Thesecharacteristicscanchangeinbothsizeanddatatype.YoustartbydefiningtheCustomerclassasshownbelow:publicclassCustomer{privateintcustID;privateArrayListattributes;publicintCustomerID{get{returncustID;}}publicCustomer(intCustomerID){this.custID=CustomerID;this.attributes=newArrayList();}publicvoidAddAttribute(objectatt){attributes.Add(att);}}YouhavetocreatetheFindAttributemethodforlocatingattributesinCustomerobjectsnomatterwhatthedatatypeis.YouneedtoensurethattheFindAttributemethodreturnstheattributeiffound,andyoualsoneedtoensuretype-safetywhenreturningtheattribute.Whatshouldyoudo?()
A. Use the following code to declare the FindAttribute method: public T FindAttribute (T att) {//Find attribute and return the value }
B. Use the following code to declare the FindAttribute method: public object FindAttribute (object att) {//Find attribute and return the value }
C. Use the following code to declare the FindAttribute method: public T FindAttribute(T att) {//Find attribute and return the value }
D. Use the following code to declare the FindAttribute method: public string FindAttribute (string att) {//Find attribute and return the value }
