单项选择题
You work as an application developer at Certkiller .com. You are currently in theprocess of reviewing an application that was created by a fellow developer.The application that you are reviewing includes a declaration for a collection named EmployeeList, which stores Employee objects. The declaration is shown below: public class EmployeeList : Enumerator, IEnumerable { // Class implementation } You require the ability to iterate through the EmployeeList with minimum development effort.What should you do?()
A. Utilize the switch statement
B. Utilize the dowhile statement
C. Utilize the foreach statement
D. Utilize the if statement
相关考题
-
单项选择题
YouworkastheapplicationdeveloperatCertkiller.com.Certkiller.comusesVisualStudio.NET2005asitsapplicationdevelopmentplatform.Youaredevelopinga.NETFramework2.0applicationusedtostoreatype-safelistofnamesande-mailaddresses.Thelistwillbepopulatedallatonesfromthesorteddatawhichmeansyouwellnotalwaysneedtoperforminsertionordeletionoperationsonthedata.Youarerequiredtochooseadatastructurethatoptimizesmemoryuseandhasgoodperformance.Whatshouldyoudo?()
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
