Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

what does it means

Posted on 2009-04-17
1
Medium Priority
?
149 Views
Last Modified: 2013-12-17
hi,
what this statment means:
List<ItemRequest> request = new List<ItemRequest>();

is it create XML?

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

Accepted Solution

by:
williamcampbell earned 2000 total points
ID: 24170479
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 );
 };
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month15 days, 18 hours left to enroll

580 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