473,569 Members | 2,453 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is it with the < > brakets

Hi,

I am coming back to programming in C#, and perhaps I never came accross
this. Can someone point me in the right direction to research about them. For
instance, what do they mean in the following code:

<!-- From msdn web site content -->
// First attempt:
public List<stringPeop leIKnowInNewYor k()
{
IEnumerable<Pho neBookEntrysnew YorkNumbers =
PhoneBook.FindL istFor(“New York”);
List<stringpeop leIKnow = new List<string>();
foreach ( PhoneBookEntry ph in newYorkNumbers)
{
string name = string.Format( {0} {1}”, ph.FirstName, ph.LastName);
if ( RecognizePerson ( name ) )
peopleIKnow.Add (name);
}
return peopleIKnow;
}

Apr 3 '07 #1
3 1516
The "Brackets" < are the syntax for declaring the Collection type of a
Generic List.
That means the List is declared to hold the type that appears inside these
< guys.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Lamborghin i" wrote:
Hi,

I am coming back to programming in C#, and perhaps I never came accross
this. Can someone point me in the right direction to research about them. For
instance, what do they mean in the following code:

<!-- From msdn web site content -->
// First attempt:
public List<stringPeop leIKnowInNewYor k()
{
IEnumerable<Pho neBookEntrysnew YorkNumbers =
PhoneBook.FindL istFor(“New York”);
List<stringpeop leIKnow = new List<string>();
foreach ( PhoneBookEntry ph in newYorkNumbers)
{
string name = string.Format( {0} {1}”, ph.FirstName, ph.LastName);
if ( RecognizePerson ( name ) )
peopleIKnow.Add (name);
}
return peopleIKnow;
}
Apr 3 '07 #2
Thank you Peter.
I feel like a need a "matrix like learning" machine.
E.

"Peter Bromberg [C# MVP]" wrote:
The "Brackets" < are the syntax for declaring the Collection type of a
Generic List.
That means the List is declared to hold the type that appears inside these
< guys.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Lamborghin i" wrote:
Hi,

I am coming back to programming in C#, and perhaps I never came accross
this. Can someone point me in the right direction to research about them. For
instance, what do they mean in the following code:

<!-- From msdn web site content -->
// First attempt:
public List<stringPeop leIKnowInNewYor k()
{
IEnumerable<Pho neBookEntrysnew YorkNumbers =
PhoneBook.FindL istFor(“New York”);
List<stringpeop leIKnow = new List<string>();
foreach ( PhoneBookEntry ph in newYorkNumbers)
{
string name = string.Format( {0} {1}”, ph.FirstName, ph.LastName);
if ( RecognizePerson ( name ) )
peopleIKnow.Add (name);
}
return peopleIKnow;
}
Apr 3 '07 #3
Tell us when you know kung fu.

Jon

"Lamborghin i" <La*********@di scussions.micro soft.comwrote in message
news:6F******** *************** ***********@mic rosoft.com...
Thank you Peter.
I feel like a need a "matrix like learning" machine.
E.

"Peter Bromberg [C# MVP]" wrote:
>The "Brackets" < are the syntax for declaring the Collection type of a
Generic List.
That means the List is declared to hold the type that appears inside
these
< guys.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Lamborghini " wrote:
Hi,

I am coming back to programming in C#, and perhaps I never came accross
this. Can someone point me in the right direction to research about
them. For
instance, what do they mean in the following code:

<!-- From msdn web site content -->
// First attempt:
public List<stringPeop leIKnowInNewYor k()
{
IEnumerable<Pho neBookEntrysnew YorkNumbers =
PhoneBook.FindL istFor("New York");
List<stringpeop leIKnow = new List<string>();
foreach ( PhoneBookEntry ph in newYorkNumbers)
{
string name = string.Format(" {0} {1}", ph.FirstName,
ph.LastName);
if ( RecognizePerson ( name ) )
peopleIKnow.Add (name);
}
return peopleIKnow;
}

Apr 3 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2949
by: Francesco Moi | last post by:
Hello. I'm trying to build a RSS feed for my website. It starts: ----------------//--------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd"> <rss version="0.91"> ----------------//----------------------
1
6813
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document domDocument; Element domElement; // Root tag
4
9637
by: matatu | last post by:
Hi to all, I have a xml file, a substring like: &lt;a href=&quot;#&quot;&gt;text&lt;/a&gt; which after an xslt trasform is rendered as (using xsl:output method html): &lt;a href="#"&gt;text&lt;/a&gt;
2
10548
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script type="text/javascript"> <!]> </script> <script type="text/javascript"
2
22930
by: Francesco Moi | last post by:
Hello. I designed a form to edit some DataBase's fields. But some of these fields contain '&lt;' and '&gt;' characters. And these characters are '<' and '>' in HTML. So if want to edit these fields, the form converts them into '<' and '>'. And I want to mantain '&lt;' and '&gt;' Mi piece of code:
34
10992
by: Mark Moore | last post by:
It looks like there's a pretty serious CSS bug in IE6 (v6.0.2800.1106). The HTML below is validated STRICT HTML 4.01 and renders as I would expect in Opera, FrontPage, and Netscape. For some reason, there's an annoying vertical gap between adjacent rules that doesn't go away. This looks like IE6 is incorrectly setting the margin to some...
6
24272
by: tentstitcher | last post by:
Hi all: I have a source xml document with an element of type string. This element contains something like the following: <stringData> &lt;Header&gt; &lt;Body&gt; </stringData> I would like to apply an XSLT and replace all occurances of &lt; with < and &gt; with >.
3
8171
by: John Nagle | last post by:
I have XML replies in a DOM which contain entity escapes, like "&amp;". What's the proper way to replace them with the ordinary characters? Preferably something that will work in most browsers? I know about ".innerText", but that's not portable; some browsers convert escapes when reading from innerText and some don't. John Nagle
4
11909
by: mark4asp | last post by:
I have an element, report which contains tags which have been transformed. E.g. <pis &lt;p&gt <myXml> <report>This text has html tags in it.&lt;p&gt which but <has been changed to &lt;&gt</report> </myXml> I there a way that the XSLT transformation can render the content as html rather than text?
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7678
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6286
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5222
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3656
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.