CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2011
    Posts
    3

    Unhappy This was a question for an MCTS exam

    You need to retrieve all queued e-mail messages into a collection and ensure type safety. Which code segment should you use to define the signature of the GetQueuedEmailsFromDb() method in the Poller.cs file?

    A. private static object[] GetQueuedEmailsFromDb(int queueID)
    B. private static ArrayList GetQueuedEmailsFromDb(int queueID)
    C. private static EmailMessages GetQueuedEmailsFromDb(int queueID)
    D. private static IList<object> GetQueuedEmailsFromDb(int queueID)

    Is the answer choice D correct since it has generics parameter ?

  2. #2
    Cimperiali's Avatar
    Cimperiali is offline Old Uncle Moderator Power Poster Cimperiali is a name known to all (1000+) Cimperiali is a name known to all (1000+) Cimperiali is a name known to all (1000+) Cimperiali is a name known to all (1000+) Cimperiali is a name known to all (1000+) Cimperiali is a name known to all (1000+) Cimperiali is a name known to all (1000+) Cimperiali is a name known to all (1000+) Cimperiali is a name known to all (1000+)
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,722

    Re: This was a question for an MCTS exam

    It sounds as if the only "type safe collection" there is the " EmailMessages" , thus answer should be C
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts



HTML5 Development Center

Click Here to Expand Forum to Full Width