what does it means

Posted on 2009-04-17
Last Modified: 2013-12-17
what this statment means:
List<ItemRequest> request = new List<ItemRequest>();

is it create XML?

full description will highly appreciated.
Question by:ethar1
    1 Comment
    LVL 12

    Accepted Solution

    List<ItemRequest> request = new List<ItemRequest>();

    List is a linked list of items... in this case the items are things called "ItemRequest"
    You use the <  and >  to specify a 'type' it is not XML
    List is part of C#
    ItemRequest is a type in your Code somewhere and is probably a Class

    The < and > relate to things called templates

    What the line above is doing is creating a brand new list of the type ItemRequest in memory to work with

    you can now say things like

     ItemRequest IR1 = new ItemRequest ( "Apple" );
     ItemRequest IR2  = new ItemRequest ( "Egg" );
     ItemRequest IR3 = new ItemRequest ( "Harrier Jump Jet" );

      request.Add (IR1);
      request.Add( IR2 );
      request.Add( IR3 );

      foreach ( ItemRequest ir in request )
        Trace ( "The item is " + ir );

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now