<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Abbus's Weblog</title>
	<atom:link href="http://abbus.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://abbus.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Tue, 14 Apr 2009 15:55:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='abbus.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Abbus's Weblog</title>
		<link>http://abbus.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://abbus.wordpress.com/osd.xml" title="Abbus&#039;s Weblog" />
	<atom:link rel='hub' href='http://abbus.wordpress.com/?pushpress=hub'/>
		<item>
		<title>collection class</title>
		<link>http://abbus.wordpress.com/2009/04/14/collection-class/</link>
		<comments>http://abbus.wordpress.com/2009/04/14/collection-class/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 15:55:14 +0000</pubDate>
		<dc:creator>abbus</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://abbus.wordpress.com/?p=13</guid>
		<description><![CDATA[System.Collections Namespace The System.Collections namespace contains interfaces and classes that define various collections of objects, such as lists, queues, bit arrays, hash tables and dictionaries.  Classes   Class Description ArrayList Implements the IList interface using an array whose size is dynamically increased as required. BitArray Manages a compact array of bit values, which are represented [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=13&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><strong><span style="font-size:9pt;color:black;font-family:&quot;">System.Collections Namespace</span></strong></p>
<p style="vertical-align:top;"><span style="font-size:9pt;"><span style="font-family:Verdana;">The <span class="selflink"><strong>System.Collections</strong></span> namespace contains interfaces and classes that define various collections of objects, such as lists, queues, bit arrays, hash tables and dictionaries. </span></span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:9pt;color:black;font-family:&quot;"> Classes </span></p>
<table class="MsoNormalTable" style="width:97%;border:#dddddd 1pt solid;margin:auto auto auto 3.75pt;" border="1" cellpadding="0" width="97%">
<tbody>
<tr>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">  </span></strong></p>
</td>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">Class</span></strong></p>
</td>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">Description</span></strong></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.arraylist.aspx"><span style="font-family:&quot;">ArrayList</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Implements the <a href="http://msdn.microsoft.com/en-us/library/system.collections.ilist.aspx"><span style="font-family:&quot;">IList</span></a> interface using an array whose size is dynamically increased as required.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.bitarray.aspx"><span style="font-family:&quot;">BitArray</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Manages a compact array of bit values, which are represented as Booleans, where <span class="input1"><strong>true</strong></span> indicates that the bit is on (1) and <span class="input1"><strong>false</strong></span> indicates the bit is off (0).</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.caseinsensitivecomparer.aspx"><span style="font-family:&quot;">CaseInsensitiveComparer</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Compares two objects for equivalence, ignoring the case of strings. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.caseinsensitivehashcodeprovider.aspx"><span style="font-family:&quot;">CaseInsensitiveHashCodeProvider</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><strong><span style="font-size:9pt;color:black;font-family:&quot;">Obsolete. </span></strong><span style="font-size:9pt;color:black;font-family:&quot;">Supplies a hash code for an object, using a hashing algorithm that ignores the case of strings. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.collectionbase.aspx"><span style="font-family:&quot;">CollectionBase</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Provides the <span class="input1"><strong>abstract</strong></span> base class for a strongly typed collection.</span></p>
</td>
</tr>
<tr style="height:29.4pt;">
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;height:29.4pt;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;height:29.4pt;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.comparer.aspx"><span style="font-family:&quot;">Comparer</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;height:29.4pt;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Compares two objects for equivalence, where string comparisons are case-sensitive. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.dictionarybase.aspx"><span style="font-family:&quot;">DictionaryBase</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Provides the <span class="input1"><strong>abstract</strong></span> base class for a strongly typed collection of key/value pairs.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.hashtable.aspx"><span style="font-family:&quot;">Hashtable</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a collection of key/value pairs that are organized based on the hash code of the key.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.queue.aspx"><span style="font-family:&quot;">Queue</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a first-in, first-out collection of objects.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.readonlycollectionbase.aspx"><span style="font-family:&quot;">ReadOnlyCollectionBase</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Provides the <span class="input1"><strong>abstract</strong></span> base class for a strongly typed non-generic read-only collection.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.sortedlist.aspx"><span style="font-family:&quot;">SortedList</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a collection of key/value pairs that are sorted by the keys and are accessible by key and by index.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.stack.aspx"><span style="font-family:&quot;">Stack</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a simple last-in-first-out (LIFO) non-generic collection of objects.</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:9pt;color:black;font-family:&quot;"> Structures </span></p>
<table class="MsoNormalTable" style="width:97%;border:#dddddd 1pt solid;margin:auto auto auto 3.75pt;" border="1" cellpadding="0" width="97%">
<tbody>
<tr>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">  </span></strong></p>
</td>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">Structure</span></strong></p>
</td>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">Description</span></strong></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.dictionaryentry.aspx"><span style="font-family:&quot;">DictionaryEntry</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Defines a dictionary key/value pair that can be set or retrieved. </span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:9pt;color:black;font-family:&quot;"> Interfaces </span></p>
<table class="MsoNormalTable" style="width:97%;border:#dddddd 1pt solid;margin:auto auto auto 3.75pt;" border="1" cellpadding="0" width="97%">
<tbody>
<tr>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">  </span></strong></p>
</td>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">Interface</span></strong></p>
</td>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">Description</span></strong></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.icollection.aspx"><span style="font-family:&quot;">ICollection</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Defines size, enumerators, and synchronization methods for all nongeneric collections. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.icomparer.aspx"><span style="font-family:&quot;">IComparer</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Exposes a method that compares two objects. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.idictionary.aspx"><span style="font-family:&quot;">IDictionary</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a nongeneric collection of key/value pairs. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.idictionaryenumerator.aspx"><span style="font-family:&quot;">IDictionaryEnumerator</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Enumerates the elements of a nongeneric dictionary. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.ienumerable.aspx"><span style="font-family:&quot;">IEnumerable</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Exposes the enumerator, which supports a simple iteration over a non-generic collection. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.ienumerator.aspx"><span style="font-family:&quot;">IEnumerator</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Supports a simple iteration over a nongeneric collection. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.iequalitycomparer.aspx"><span style="font-family:&quot;">IEqualityComparer</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Defines methods to support the comparison of objects for equality. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.ihashcodeprovider.aspx"><span style="font-family:&quot;">IHashCodeProvider</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><strong><span style="font-size:9pt;color:black;font-family:&quot;">Obsolete. </span></strong><span style="font-size:9pt;color:black;font-family:&quot;">Supplies a hash code for an object, using a custom hash function. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.ilist.aspx"><span style="font-family:&quot;">IList</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a non-generic collection of objects that can be individually accessed by index. </span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;"> </span></p>
<p style="vertical-align:top;"><span style="font-size:9pt;"><span style="font-family:Verdana;">The <span class="selflink"><strong>System.Collections.Generic</strong></span> namespace contains interfaces and classes that define generic collections, which allow users to create strongly typed collections that provide better type safety and performance than non-generic strongly typed collections.</span></span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:9pt;color:black;font-family:&quot;"> Classes </span></p>
<table class="MsoNormalTable" style="width:97%;border:#dddddd 1pt solid;margin:auto auto auto 3.75pt;" border="1" cellpadding="0" width="97%">
<tbody>
<tr>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">  </span></strong></p>
</td>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">Class</span></strong></p>
</td>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">Description</span></strong></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/cfttsh47.aspx"><span style="font-family:&quot;">Comparer</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Provides a base class for implementations of the <a href="http://msdn.microsoft.com/en-us/library/8ehhxeaf.aspx"><span style="font-family:&quot;">IComparer</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a> generic interface. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/xfhwa508.aspx"><span style="font-family:&quot;">Dictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a collection of keys and values.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/3fcwy8h6.aspx"><span style="font-family:&quot;">Dictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">KeyCollection</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents the collection of keys in a <a href="http://msdn.microsoft.com/en-us/library/xfhwa508.aspx"><span style="font-family:&quot;">Dictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a>. This class cannot be inherited. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/x8bctb9c.aspx"><span style="font-family:&quot;">Dictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">ValueCollection</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents the collection of values in a <a href="http://msdn.microsoft.com/en-us/library/xfhwa508.aspx"><span style="font-family:&quot;">Dictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a>. This class cannot be inherited. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/ms132123.aspx"><span style="font-family:&quot;">EqualityComparer</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(<span>Of </span></span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Provides a base class for implementations of the <a href="http://msdn.microsoft.com/en-us/library/ms132151.aspx"><span style="font-family:&quot;">IEqualityComparer</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a> generic interface. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/bb359438.aspx"><span style="font-family:&quot;">HashSet</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a set of values. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/ms404549.aspx"><span style="font-family:&quot;">KeyedByTypeCollection</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TItem</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Provides a collection whose items are types that serve as keys.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/system.collections.generic.keynotfoundexception.aspx"><span style="font-family:&quot;">KeyNotFoundException</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">The exception that is thrown when the key specified for accessing an element in a collection does not match any key in the collection. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/he2s3bh7.aspx"><span style="font-family:&quot;">LinkedList</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a doubly linked list.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/ahf4c754.aspx"><span style="font-family:&quot;">LinkedListNode</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a node in a <a href="http://msdn.microsoft.com/en-us/library/he2s3bh7.aspx"><span style="font-family:&quot;">LinkedList</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a>. This class cannot be inherited. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx"><span style="font-family:&quot;">List</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/7977ey2c.aspx"><span style="font-family:&quot;">Queue</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a first-in, first-out collection of objects.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/f7fta44c.aspx"><span style="font-family:&quot;">SortedDictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a collection of key/value pairs that are sorted on the key.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/ms132259.aspx"><span style="font-family:&quot;">SortedDictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">KeyCollection</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents the collection of keys in a <a href="http://msdn.microsoft.com/en-us/library/f7fta44c.aspx"><span style="font-family:&quot;">SortedDictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a>. This class cannot be inherited. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/ms132289.aspx"><span style="font-family:&quot;">SortedDictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">ValueCollection</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents the collection of values in a <a href="http://msdn.microsoft.com/en-us/library/f7fta44c.aspx"><span style="font-family:&quot;">SortedDictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a>. This class cannot be inherited.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/ms132319.aspx"><span style="font-family:&quot;">SortedList</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a collection of key/value pairs that are sorted by key based on the associated <a href="http://msdn.microsoft.com/en-us/library/8ehhxeaf.aspx"><span style="font-family:&quot;">IComparer</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a> implementation.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/3278tedw.aspx"><span style="font-family:&quot;">Stack</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a variable size last-in-first-out (LIFO) collection of instances of the same arbitrary type. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/ms668265.aspx"><span style="font-family:&quot;">SynchronizedCollection</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Provides a thread-safe collection that contains objects of a type specified by the generic parameter as elements.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/ms668294.aspx"><span style="font-family:&quot;">SynchronizedKeyedCollection</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">K, T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Provides a thread-safe collection that contains objects of a type specified by a generic parameter and that are grouped by keys.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/ms404554.aspx"><span style="font-family:&quot;">SynchronizedReadOnlyCollection</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Provides a thread-safe, read-only collection that contains objects of a type specified by the generic parameter as elements.</span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:9pt;color:black;font-family:&quot;"> Structures </span></p>
<table class="MsoNormalTable" style="width:97%;border:#dddddd 1pt solid;margin:auto auto auto 3.75pt;" border="1" cellpadding="0" width="97%">
<tbody>
<tr>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">  </span></strong></p>
</td>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">Structure</span></strong></p>
</td>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">Description</span></strong></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/k3z2hhax.aspx"><span style="font-family:&quot;">Dictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">Enumerator</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Enumerates the elements of a <a href="http://msdn.microsoft.com/en-us/library/xfhwa508.aspx"><span style="font-family:&quot;">Dictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a>. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/8a7wk24w.aspx"><span style="font-family:&quot;">Dictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">KeyCollection</span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">Enumerator</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Enumerates the elements of a <a href="http://msdn.microsoft.com/en-us/library/3fcwy8h6.aspx"><span style="font-family:&quot;">Dictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">KeyCollection</span></a>. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/ax9d1dzh.aspx"><span style="font-family:&quot;">Dictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">ValueCollection</span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">Enumerator</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Enumerates the elements of a <a href="http://msdn.microsoft.com/en-us/library/x8bctb9c.aspx"><span style="font-family:&quot;">Dictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">ValueCollection</span></a>. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/bb339801.aspx"><span style="font-family:&quot;">HashSet</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">Enumerator</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Enumerates the elements of a <a href="http://msdn.microsoft.com/en-us/library/bb359438.aspx"><span style="font-family:&quot;">HashSet</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a> object. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/5tbh8a42.aspx"><span style="font-family:&quot;">KeyValuePair</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Defines a key/value pair that can be set or retrieved. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/2s4xk11f.aspx"><span style="font-family:&quot;">LinkedList</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">Enumerator</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Enumerates the elements of a <a href="http://msdn.microsoft.com/en-us/library/he2s3bh7.aspx"><span style="font-family:&quot;">LinkedList</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a>. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/x854yt9s.aspx"><span style="font-family:&quot;">List</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">Enumerator</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Enumerates the elements of a <a href="http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx"><span style="font-family:&quot;">List</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a>. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/1ttzy8a4.aspx"><span style="font-family:&quot;">Queue</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">Enumerator</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Enumerates the elements of a <a href="http://msdn.microsoft.com/en-us/library/7977ey2c.aspx"><span style="font-family:&quot;">Queue</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a>. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/ms132249.aspx"><span style="font-family:&quot;">SortedDictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">Enumerator</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Enumerates the elements of a <a href="http://msdn.microsoft.com/en-us/library/f7fta44c.aspx"><span style="font-family:&quot;">SortedDictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a>. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/ms132279.aspx"><span style="font-family:&quot;">SortedDictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">KeyCollection</span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">Enumerator</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Enumerates the elements of a <a href="http://msdn.microsoft.com/en-us/library/ms132259.aspx"><span style="font-family:&quot;">SortedDictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">KeyCollection</span></a>. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/ms132309.aspx"><span style="font-family:&quot;">SortedDictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">ValueCollection</span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">Enumerator</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Enumerates the elements of a <a href="http://msdn.microsoft.com/en-us/library/ms132289.aspx"><span style="font-family:&quot;">SortedDictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">ValueCollection</span></a>. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/x2bb46cs.aspx"><span style="font-family:&quot;">Stack</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span><span class="cs"><span style="color:#0033cc;"><span>.</span></span></span><span class="vb"><span style="color:#0033cc;"><span>.</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>::</span></span></span><span class="nu"><span style="color:#0033cc;"><span>.</span></span></span><span style="font-family:&quot;">Enumerator</span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Enumerates the elements of a <a href="http://msdn.microsoft.com/en-us/library/3278tedw.aspx"><span style="font-family:&quot;">Stack</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a>. </span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:9pt;color:black;font-family:&quot;"> Interfaces </span></p>
<table class="MsoNormalTable" style="width:97%;border:#dddddd 1pt solid;margin:auto auto auto 3.75pt;" border="1" cellpadding="0" width="97%">
<tbody>
<tr>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">  </span></strong></p>
</td>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">Interface</span></strong></p>
</td>
<td style="border-right:#cccccc 1pt solid;border-top:#cccccc 1pt solid;background:#cccccc;border-left:#cccccc 1pt solid;border-bottom:#c8cdde 1pt solid;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:3.75pt 0;"><strong><span style="font-size:9pt;color:#000066;font-family:&quot;">Description</span></strong></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/92t2ye13.aspx"><span style="font-family:&quot;">ICollection</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Defines methods to manipulate generic collections.</span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/8ehhxeaf.aspx"><span style="font-family:&quot;">IComparer</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Defines a method that a type implements to compare two objects. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/s4ys34ea.aspx"><span style="font-family:&quot;">IDictionary</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">TKey, TValue</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a generic collection of key/value pairs. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/9eekhta0.aspx"><span style="font-family:&quot;">IEnumerable</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Exposes the enumerator, which supports a simple iteration over a collection of a specified type. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/78dfe2yb.aspx"><span style="font-family:&quot;">IEnumerator</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Supports a simple iteration over a generic collection. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/ms132151.aspx"><span style="font-family:&quot;">IEqualityComparer</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Defines methods to support the comparison of objects for equality. </span></p>
</td>
</tr>
<tr>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://msdn.microsoft.com/en-us/library/5y536ey6.aspx"><span style="font-family:&quot;">IList</span><span class="cs"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>(Of </span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&lt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>(</span></span></span><span style="font-family:&quot;">T</span><span class="cs"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="vb"><span style="color:#0033cc;"><span>)</span></span></span><span class="cpp"><span style="color:#0033cc;"><span>&gt;</span></span></span><span class="nu"><span style="color:#0033cc;"><span>)</span></span></span></a></span></p>
</td>
<td style="border-right:#d5d5d3 1pt solid;border-top:#cccccc 1pt solid;background:white;border-left:#cccccc 1pt solid;border-bottom:#cccccc 1pt solid;padding:3.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:.75pt;"><span style="font-size:9pt;color:black;font-family:&quot;">Represents a collection of objects that can be individually accessed by index. </span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">If you look at the .NET framework documentation, you will be overwhelmed with the amount of types that are there. There are over 7000+ types in the framework class library and they cater to all the needs of computing ever envisaged. There are data structures for representing collections, hash tables, dictionaries, network protocols and so onThe </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">System.Collections</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> namespace contains a series of types for representing various types of collections, which can be used to store objects of various types and retrieved according to the access method dictated by the collection.</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">In this article, I&#8217;m going to look at the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> type that is present in the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">System.Collections</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> namespace and see how the stack can be used for programming tasks. I will show some simple examples that show the operation of this collection and then use these concepts to build upon an application that will perform more meaningful tasks. But before we start on the examples, some basics</span><span style="font-size:10pt;color:black;font-family:&quot;">�</span><span style="font-size:10pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><strong><span style="font-size:13pt;color:#ff9900;font-family:&quot;">What is a stack?</span></strong></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">If you look at any book on data structures, a stack is defined as a last in first out list. We will stick to this definition and not complicate it further!</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">By last-in-first-out what we mean is, if a set of objects are put into a stack, the last object that was put in, will be the first object to be taken out. For example, if you see in restaurants that have an automatic plate dispenser, a stack of plates are kept and as each person takes a plate, the next plate in the stack becomes available. Diagrammatically, this looks like the following:</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;"></span><span style="font-size:10pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">The operation of putting an object into a stack is called push and the operation of taking an object out of the stack is called pop. Sometimes, it might be required to just &#8220;examine&#8221; the top element from a stack without taking it out. This operation is called peek. This simple data structure represents a very common concept that we keep seeing/doing in our daily lives!!</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">There are many ways to program a stack. The traditional method has been to represent a stack by means of an array (wrapped around a class) and then provide methods that allow the operations discussed above. If you are a Visual Basic programmer, you can see an implementation at: <a href="http://www.developersdomain.com/vb/articles/stack.htm" target="_blank"><span><span>ht<span>tp://www.developersdomain.com/vb/articles/stack.htm</span></span></span></a>.</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">Rather than having various implementations of stacks floating around by programmers, the .NET team has provided a type called </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> that provides the above discussed features and operations and more.</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><strong><span style="font-size:13pt;color:#ff9900;font-family:&quot;">Stack in .NET</span></strong></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">In .NET, the stack type is present in the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">System.Collections</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> namespace. The following are the operations available to us on a </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> object.</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><strong><span style="color:#ff9900;font-family:&quot;"><span style="font-size:small;">Public Constructors</span></span></strong></p>
<ul type="disc">
<li class="MsoNormal"><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;font-family:&quot;"> constructor. This is an overloaded constructor that initializes a </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;font-family:&quot;">. </span></li>
</ul>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><strong><span style="color:#ff9900;font-family:&quot;"><span style="font-size:small;">Public Properties</span></span></strong></p>
<ul type="disc">
<li class="MsoNormal"><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Count</span></span><span style="font-size:10pt;font-family:&quot;">. This property gets the number of elements in the stack. </span></li>
<li class="MsoNormal"><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">IsSynchronized</span></span><span style="font-size:10pt;font-family:&quot;">. Gets a value indicating whether access to the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;font-family:&quot;"> is synchronized (thread-safe). </span></li>
<li class="MsoNormal"><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">SyncRoot</span></span><span style="font-size:10pt;font-family:&quot;">. Gets an object that can be used to synchronize access to the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;font-family:&quot;">. </span></li>
</ul>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><strong><span style="color:#ff9900;font-family:&quot;"><span style="font-size:small;">Public Methods</span></span></strong></p>
<ul type="disc">
<li class="MsoNormal"><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Clear</span></span><span style="font-size:10pt;font-family:&quot;">. Removes all objects from the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;font-family:&quot;">. </span></li>
<li class="MsoNormal"><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Clone</span></span><span style="font-size:10pt;font-family:&quot;">. Creates a shallow copy of the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;font-family:&quot;">. </span></li>
<li class="MsoNormal"><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Contains</span></span><span style="font-size:10pt;font-family:&quot;">. Determines whether an element is in the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;font-family:&quot;">. </span></li>
<li class="MsoNormal"><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">CopyTo</span></span><span style="font-size:10pt;font-family:&quot;">. Copies the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;font-family:&quot;"> to an existing one-dimensional </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Array</span></span><span style="font-size:10pt;font-family:&quot;">, starting at the specified array index. </span></li>
<li class="MsoNormal"><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">GetEnumerator</span></span><span style="font-size:10pt;font-family:&quot;">. Returns an </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">IEnumerator</span></span><span style="font-size:10pt;font-family:&quot;"> for the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;font-family:&quot;">. </span></li>
<li class="MsoNormal"><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Peek</span></span><span style="font-size:10pt;font-family:&quot;">. Returns the </span><span style="color:blue;font-family:&quot;"><span style="font-size:small;">object</span></span><span style="font-size:10pt;font-family:&quot;"> at the top of the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;font-family:&quot;"> without removing it. </span></li>
<li class="MsoNormal"><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Pop</span></span><span style="font-size:10pt;font-family:&quot;">. Removes and returns the </span><span style="color:blue;font-family:&quot;"><span style="font-size:small;">object</span></span><span style="font-size:10pt;font-family:&quot;"> at the top of the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;font-family:&quot;">. </span></li>
<li class="MsoNormal"><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Push</span></span><span style="font-size:10pt;font-family:&quot;">. Inserts an </span><span style="color:blue;font-family:&quot;"><span style="font-size:small;">object</span></span><span style="font-size:10pt;font-family:&quot;"> at the top of the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;font-family:&quot;">. </span></li>
<li class="MsoNormal"><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Synchronized.Returns</span></span><span style="font-size:10pt;font-family:&quot;"> a synchronized (thread-safe) wrapper for the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;font-family:&quot;">. </span></li>
<li class="MsoNormal"><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">ToArray</span></span><span style="font-size:10pt;font-family:&quot;">. Copies the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;font-family:&quot;"> to a new array. </span></li>
</ul>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">All collections also inherit from </span><span style="font-size:small;"><span style="color:#990000;font-family:&quot;">System.</span><span style="color:blue;font-family:&quot;">Object</span></span><span style="font-size:10pt;color:black;font-family:&quot;">. Therefore all the methods from the base class are also available for access.</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">We will not see examples of all the above methods, but only see the important ones. For more information on each of these methods, see the .NET Framework documentation.</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><strong><span style="font-size:13pt;color:#ff9900;font-family:&quot;">A simple stack example</span></strong></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">Ok, enough of the basics. Let&#8217;s get down to work. Fire up Visual Studio .NET and choose Console Application (Visual Basic .NET) as the project type and type in the following code into the editor.</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:8pt;color:black;font-family:&quot;"></span><span style="font-size:8pt;color:black;font-family:&quot;border:windowtext 1pt;padding:0;">Collapse</span><span style="font-size:8pt;color:black;font-family:&quot;"> </span><span style="font-size:8pt;color:black;font-family:&quot;"><a href="http://www.codeproject.com/KB/dotnet/stacks.aspx"><span style="font-family:&quot;"><span>Copy Code</span></span></a></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:blue;font-family:&quot;">Imports</span><span style="font-size:9pt;color:black;font-family:&quot;"> System.Collections</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:blue;font-family:&quot;">Module</span><span style="font-size:9pt;color:black;font-family:&quot;"> TestModule</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Sub</span><span style="font-size:9pt;color:black;font-family:&quot;"> Main()</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Declare and initialize a stack type</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Dim</span><span style="font-size:9pt;color:black;font-family:&quot;"> oStack </span><span style="font-size:9pt;color:blue;font-family:&quot;">As</span><span style="font-size:9pt;color:black;font-family:&quot;"> Stack</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>oStack = </span><span style="font-size:9pt;color:blue;font-family:&quot;">New</span><span style="font-size:9pt;color:black;font-family:&quot;"> Stack</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Push some elements into the stack. Note that this</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; can be any object</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>oStack.Push(</span><span style="font-size:9pt;color:purple;font-family:&quot;">&#8220;1&#8243;</span><span style="font-size:9pt;color:black;font-family:&quot;">)</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>oStack.Push(</span><span style="font-size:9pt;color:purple;font-family:&quot;">&#8220;2&#8243;</span><span style="font-size:9pt;color:black;font-family:&quot;">)</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Print some statistics about the stack</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>Console.WriteLine(</span><span style="font-size:9pt;color:purple;font-family:&quot;">&#8220;Stack Count = {0}&#8221;</span><span style="font-size:9pt;color:black;font-family:&quot;">, oStack.Count())</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>Console.WriteLine(</span><span style="font-size:9pt;color:purple;font-family:&quot;">&#8220;Top Element = {0}&#8221;</span><span style="font-size:9pt;color:black;font-family:&quot;">, oStack.Peek())</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>Console.WriteLine(</span><span style="font-size:9pt;color:purple;font-family:&quot;">&#8220;Get First Element = {0}&#8221;</span><span style="font-size:9pt;color:black;font-family:&quot;">, oStack.Pop())</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Clear the contents of the stack</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>oStack.Clear()</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Print some statistics about the stack</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>Console.WriteLine(</span><span style="font-size:9pt;color:purple;font-family:&quot;">&#8220;Stack Count = {0}&#8221;</span><span style="font-size:9pt;color:black;font-family:&quot;">, _</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                                 </span>oStack.Count())</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Wait for some console input so </span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; that we can see the output from</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; the above lines</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>Console.Read()</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">End</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Sub</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:blue;font-family:&quot;">End</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Module</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">Note that I&#8217;ve changed the module name to <em>TestModule</em>. This means that you have to change the VS.NET project properties to set the startup object as <em>TestModule</em>.</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">And that&#8217;s it!! We have a stack implemented. The output of the program will be as follows:</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;"></span><span style="font-size:10pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">So what did we do? We created a stack and then pushed two items into it using the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">push</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> method. Then, using some of the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> object methods, we print some details about the stack. Note that the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">peek</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> method did not remove the top element. Finally, we clear the stack and print the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">count</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> and its 0, indicating that the stack is now empty. </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">That was a very simple example that showed some details about the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">stack</span></span><span style="font-size:10pt;color:black;font-family:&quot;">. Now, let&#8217;s build a more interesting application.</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><strong><span style="font-size:13pt;color:#ff9900;font-family:&quot;">The Reverse Polish Notation calculator</span></strong></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">In this section, we are going to build a simple calculator application that well, adds and subtracts numbers (there are more sophisticated calculators in the market, but we are going to keep it simple!!).</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">The method that we are going to use to represent the calculator object is by using a notation called the reverse polish notation. You can find more details about this at: <a href="http://www.calculator.org/rpn.html" target="_blank"><span><span>http:/<span>/www.calculator.org/rpn.html</span></span></span></a>. Essentially, in the polish calculator, the various operators and operands are &#8220;pushed&#8221; and &#8220;popped&#8221; from a stack to obtain the results. To start with, as and when we encounter numbers, we &#8220;push&#8221; them onto the stack and when we start encountering operators, we &#8220;pop&#8221; the values from the stack, do the operation and &#8220;push&#8221; the result onto the stack. So let&#8217;s take a simple example: Say we want to evaluate the expression (3 + 5) * (7 </span><span style="font-size:10pt;color:black;font-family:&quot;">�</span><span style="font-size:10pt;color:black;font-family:&quot;"> 2). In the RPN calculator, this expression would be represented as 3 5 +</span><span style="font-size:10pt;color:black;font-family:&quot;"> 7 2 &#8211; * and from a programming perspective would be made of the following steps:</span></p>
<ul type="disc">
<li class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">Push 3 onto the stack. </span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">Push 5 onto the stack. The stack now contains (3, 5). </span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">Apply the + operation: take the top two numbers off the stack, add them together, and put the result back on the stack. The stack now contains just the number 8. </span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">Push 7 onto the stack. </span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">Push 2 onto the stack. It now contains (8, 7, 2). </span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">Apply the &#8211; operation: take the top two numbers off the stack, subtract the top one from the one below, and put the result back on the stack. The stack now contains (8, 5). </span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">Apply the * operation: take the top two numbers off the stack, multiply them together, and put the result back on the stack. The stack now contains just the number 40.</span></li>
</ul>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">This looks pretty interesting, right? So let&#8217;s model a .NET class for doing this operation for us. In the VS.NET project opened earlier, right click and add a new class module (called <em>PolishCalc</em>). Paste the code from the following snippet onto the editor.</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:8pt;color:black;font-family:&quot;"></span><span style="font-size:8pt;color:black;font-family:&quot;border:windowtext 1pt;padding:0;">Collapse</span><span style="font-size:8pt;color:black;font-family:&quot;"> </span><span style="font-size:8pt;color:black;font-family:&quot;"><a href="http://www.codeproject.com/KB/dotnet/stacks.aspx"><span style="font-family:&quot;"><span>Copy Code</span></span></a></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; This class is used to evaluate a </span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; reverse polish notation calculator</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:blue;font-family:&quot;">Imports</span><span style="font-size:9pt;color:black;font-family:&quot;"> System.Collections</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:blue;font-family:&quot;">Public</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Class</span><span style="font-size:9pt;color:black;font-family:&quot;"> PolishCalc</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Private</span><span style="font-size:9pt;color:black;font-family:&quot;"> oStack </span><span style="font-size:9pt;color:blue;font-family:&quot;">As</span><span style="font-size:9pt;color:black;font-family:&quot;"> Stack</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; A constructor that takes no argument</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Public</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Sub</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">New</span><span style="font-size:9pt;color:black;font-family:&quot;">()</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Initialize the internal stack for use</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>oStack = </span><span style="font-size:9pt;color:blue;font-family:&quot;">New</span><span style="font-size:9pt;color:black;font-family:&quot;"> Stack</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">End</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Sub</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Fetch the result from the stack. </span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Note that the top element from the</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; stack is returned without removing it</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Public</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">ReadOnly</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Property</span><span style="font-size:9pt;color:black;font-family:&quot;"> Result()</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Get</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>            </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Return</span><span style="font-size:9pt;color:black;font-family:&quot;"> (oStack.Peek())</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">End</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Get</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">End</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Property</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; This function will evaluate an expression </span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; that is expressed in the</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; reverse polish notation. For example: 35+27-*</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>   </span><span> </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Public</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Function</span><span style="font-size:9pt;color:black;font-family:&quot;"> Evaluate(</span><span style="font-size:9pt;color:blue;font-family:&quot;">ByVal</span><span style="font-size:9pt;color:black;font-family:&quot;"> Expression_</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                          </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">As</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">String</span><span style="font-size:9pt;color:black;font-family:&quot;">) </span><span style="font-size:9pt;color:blue;font-family:&quot;">As</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Integer</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Dim</span><span style="font-size:9pt;color:black;font-family:&quot;"> nLength </span><span style="font-size:9pt;color:blue;font-family:&quot;">As</span><span style="font-size:9pt;color:black;font-family:&quot;"> Integer, i </span><span style="font-size:9pt;color:blue;font-family:&quot;">As</span><span style="font-size:9pt;color:black;font-family:&quot;"> Integer,_</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                            </span>nValue </span><span style="font-size:9pt;color:blue;font-family:&quot;">As</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Integer</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Dim</span><span style="font-size:9pt;color:black;font-family:&quot;"> strValue </span><span style="font-size:9pt;color:blue;font-family:&quot;">As</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">String</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>nLength = Expression.Length()</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span> </span><span>       </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">For</span><span style="font-size:9pt;color:black;font-family:&quot;"> i = </span><span style="font-size:9pt;color:navy;font-family:&quot;">0</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">To</span><span style="font-size:9pt;color:black;font-family:&quot;"> (nLength &#8211; </span><span style="font-size:9pt;color:navy;font-family:&quot;">1</span><span style="font-size:9pt;color:black;font-family:&quot;">)</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>            </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Get the character at the required position</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>            </span>strValue = (Expression.Chars(i)).ToString()</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>            </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Evaluate the expression that was fetched</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>            </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Select</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Case</span><span style="font-size:9pt;color:black;font-family:&quot;"> strValue</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Case</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:purple;font-family:&quot;">&#8220;+&#8221;</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Retrieve two values from </span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; the stack, calculate the sum</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; and push the result back</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span>nValue = </span><span style="font-size:9pt;color:blue;font-family:&quot;">CType</span><span style="font-size:9pt;color:black;font-family:&quot;">(oStack.Pop(), </span><span style="font-size:9pt;color:blue;font-family:&quot;">Integer</span><span style="font-size:9pt;color:black;font-family:&quot;">) _</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                            </span>+ </span><span style="font-size:9pt;color:blue;font-family:&quot;">CType</span><span style="font-size:9pt;color:black;font-family:&quot;">(oStack.Pop(), </span><span style="font-size:9pt;color:blue;font-family:&quot;">Integer</span><span style="font-size:9pt;color:black;font-family:&quot;">)</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span>oStack.Push(nValue.ToString())</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Case</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:purple;font-family:&quot;">&#8220;-&#8221;</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Retrieve two values from the stack, </span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; calculate the difference</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; and push the result back</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>             </span><span>       </span>nValue = </span><span style="font-size:9pt;color:blue;font-family:&quot;">CType</span><span style="font-size:9pt;color:black;font-family:&quot;">(oStack.Pop(), _</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                      </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Integer</span><span style="font-size:9pt;color:black;font-family:&quot;">) &#8211; </span><span style="font-size:9pt;color:blue;font-family:&quot;">CType</span><span style="font-size:9pt;color:black;font-family:&quot;">(oStack.Pop(), </span><span style="font-size:9pt;color:blue;font-family:&quot;">Integer</span><span style="font-size:9pt;color:black;font-family:&quot;">)</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span>oStack.Push(nValue.ToString())</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Case</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:purple;font-family:&quot;">&#8220;*&#8221;</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Retrieve two values from the stack, </span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; calculate the product</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; and push the result back</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span>nValue = </span><span style="font-size:9pt;color:blue;font-family:&quot;">CType</span><span style="font-size:9pt;color:black;font-family:&quot;">(oStack.Pop(), _</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                        </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Integer</span><span style="font-size:9pt;color:black;font-family:&quot;">) * </span><span style="font-size:9pt;color:blue;font-family:&quot;">CType</span><span style="font-size:9pt;color:black;font-family:&quot;">(oStack.Pop(), </span><span style="font-size:9pt;color:blue;font-family:&quot;">Integer</span><span style="font-size:9pt;color:black;font-family:&quot;">)</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span>oStack.Push(nValue.ToString())</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Case</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Else</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; It will be a number, so push it onto the stack</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>                    </span>oStack.Push(strValue)</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>            </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">End</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Select</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Next</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">End</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Function</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Clear the polish calculator</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Public</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Function</span><span style="font-size:9pt;color:black;font-family:&quot;"> Clear()</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>oStack.Clear()</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">End</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Function</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:blue;font-family:&quot;">End</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Class</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">The above code represents a simple calculator with 3 operations (+, &#8211; and *). As mentioned in the polish specification, we use a stack to model all out operations. The result of the expression is available as a read-only property called </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Result</span></span><span style="font-size:10pt;color:black;font-family:&quot;">. Note that we use the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">peek</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> function to return the result, since we want the last result to be available in the stack for any other operations. Finally, we have a </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">clear</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> method that allows us to start all over again.</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">Ok, let&#8217;s test our code. Go back to the console application in the VS.NET solution window and type in the following code:</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:8pt;color:black;font-family:&quot;"></span><span style="font-size:8pt;color:black;font-family:&quot;border:windowtext 1pt;padding:0;">Collapse</span><span style="font-size:8pt;color:black;font-family:&quot;"> </span><span style="font-size:8pt;color:black;font-family:&quot;"><a href="http://www.codeproject.com/KB/dotnet/stacks.aspx"><span style="font-family:&quot;"><span>Copy Code</span></span></a></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:blue;font-family:&quot;">Imports</span><span style="font-size:9pt;color:black;font-family:&quot;"> System.Collections</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:blue;font-family:&quot;">Module</span><span style="font-size:9pt;color:black;font-family:&quot;"> TestModule</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Sub</span><span style="font-size:9pt;color:black;font-family:&quot;"> Main()</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Initialize our polish calculator</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">Dim</span><span style="font-size:9pt;color:black;font-family:&quot;"> oPolish </span><span style="font-size:9pt;color:blue;font-family:&quot;">As</span><span style="font-size:9pt;color:black;font-family:&quot;"> PolishCalc</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>oPolish = </span><span style="font-size:9pt;color:blue;font-family:&quot;">New</span><span style="font-size:9pt;color:black;font-family:&quot;"> PolishCalc</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Evaluate a simple expression and print the results</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>oPolish.Evaluate(</span><span style="font-size:9pt;color:purple;font-family:&quot;">&#8220;35+27-*&#8221;</span><span style="font-size:9pt;color:black;font-family:&quot;">)</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>Console.WriteLine(</span><span style="font-size:9pt;color:purple;font-family:&quot;">&#8220;Result = {0}&#8221;</span><span style="font-size:9pt;color:black;font-family:&quot;">, oPolish.Result)</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>  </span><span>      </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Work on the previous result</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>oPolish.Evaluate(</span><span style="font-size:9pt;color:purple;font-family:&quot;">&#8220;5+&#8221;</span><span style="font-size:9pt;color:black;font-family:&quot;">)</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>Console.WriteLine(</span><span style="font-size:9pt;color:purple;font-family:&quot;">&#8220;Result = {0}&#8221;</span><span style="font-size:9pt;color:black;font-family:&quot;">, oPolish.Result)</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Clear our calculator</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>oPolish.Clear()</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; Wait for some input so that we </span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; can see the results in the</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span></span><em><span style="font-size:9pt;color:green;font-family:&quot;">&#8216; output window</span></em></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>        </span>Console.Read()</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>    </span></span><span style="font-size:9pt;color:blue;font-family:&quot;">End</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Sub</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:blue;font-family:&quot;">End</span><span style="font-size:9pt;color:black;font-family:&quot;"> </span><span style="font-size:9pt;color:blue;font-family:&quot;">Module</span><span style="font-size:9pt;color:black;font-family:&quot;"></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">The output from the previous program would be 40 and 45. Since the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Result</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> property does not remove the latest value from the stack, we are able to add another expression to it.</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><strong><span style="font-size:13pt;color:#ff9900;font-family:&quot;">Advanced concepts</span></strong></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">The above representation of the </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> worked well because you were the only one accessing it. If you deployed this application and had multiple threads working on this stack, then how do you guarantee that other threads do not read off the stack or manipulate it when you are working on it? The answer is to use synchronization. The </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> class provides properties and methods that will help you to synchronize access to the stack while accessing it. A sample access method would be:</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:8pt;color:black;font-family:&quot;"></span><span style="font-size:8pt;color:black;font-family:&quot;border:windowtext 1pt;padding:0;">Collapse</span><span style="font-size:8pt;color:black;font-family:&quot;"> </span><span style="font-size:8pt;color:black;font-family:&quot;"><a href="http://www.codeproject.com/KB/dotnet/stacks.aspx"><span style="font-family:&quot;"><span>Copy Code</span></span></a></span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;" lang="CS">SyncLock oStack.SyncRoot</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;" lang="CS"><span>   </span></span><span style="font-size:9pt;color:purple;font-family:&quot;" lang="CS">&#8216; Do the operations here</span></p>
<p class="MsoNormal" style="background:#fbedbb;line-height:normal;margin:0;"><span style="font-size:9pt;color:purple;font-family:&quot;" lang="CS">End SyncLock</span><span style="font-size:9pt;color:black;font-family:&quot;" lang="CS"></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">The above code lets you perform thread safe operations on the stack so that you do not encounter sudden exceptions. For more information, see the .NET framework documentation.</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><strong><span style="font-size:13pt;color:#ff9900;font-family:&quot;">What&#8217;s next?</span></strong></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">Well, if you are adventurous and want to learn .NET more, you could try a lot of things in this program. Here are some of my thoughts</span><span style="font-size:10pt;color:black;font-family:&quot;">�</span><span style="font-size:10pt;color:black;font-family:&quot;"></span></p>
<ul type="disc">
<li class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">Implement error handling in the pop and push operations. </span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">Handle numbers greater than 10. Our calculator does not handle this, since we split the string character-by-character. </span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">Handle other operations like dividing, modulus etc. </span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">Handling floating point numbers. </span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">And many more</span><span style="font-size:10pt;font-family:&quot;">�</span><span style="font-size:10pt;font-family:&quot;">. All the best!!</span><span style="font-size:10pt;font-family:&quot;"></span></li>
</ul>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><strong><span style="font-size:13pt;color:#ff9900;font-family:&quot;">Conclusion</span></strong></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">The </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">System.Collections</span></span><span style="font-size:10pt;color:black;font-family:&quot;"> is a vast namespace and we have seen the application of just of one its types called </span><span style="color:#990000;font-family:&quot;"><span style="font-size:small;">Stack</span></span><span style="font-size:10pt;color:black;font-family:&quot;">. In the future articles, I will touch upon the other collection types that are more interesting.</span></p>
<div style="border-right:medium none;border-top:medium none;border-left:medium none;border-bottom:windowtext 1pt solid;padding:0 0 1pt;">
<p class="MsoNormal" style="line-height:normal;text-align:center;margin:0;padding:0;" align="center"><span style="display:none;font-size:8pt;font-family:&quot;">Top of Form</span></p>
</div>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:black;font-family:&quot;"><span style="display:none;"></span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><strong><span style="font-size:13pt;color:#ff9900;font-family:&quot;">License</span></strong></p>
<div style="border-right:medium none;border-top:windowtext 1pt solid;border-left:medium none;border-bottom:medium none;padding:1pt 0 0;">
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:small;font-family:Arial;">using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Collections;<br />
using System.Web;<br />
using System.Web.</span><a href="http://www.dotnetspider.com/resources/22543-BINDING-System-Collections-Generic-List-TO-GRIDVIEW.aspx" target="_top"><span class="klink"><span style="font-size:10pt;color:windowtext;font-family:Courier;"><span>Security</span></span></span></a><span style="font-size:small;font-family:Arial;">;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;</p>
<p>public partial class classCric : System.Web.UI.Page<br />
{<br />
<span>  </span><span>  </span>//this is class<br />
<span>    </span>public class cricket<br />
<span>    </span>{<br />
<span>        </span>private int no;<br />
<span>        </span>private string cname;<br />
<span>        </span>private string country;<br />
<span>        </span>// this is property<br />
<span>        </span>public int no1<br />
<span>        </span>{<br />
<span>            </span>get<br />
<span>            </span>{<br />
<span>                </span>return no;<br />
<span>  </span><span>          </span>}<br />
<span>            </span>set<br />
<span>            </span>{<br />
<span>                </span>no = value;<br />
<span>            </span>}<br />
<span>        </span>}<br />
<span>        </span>public string cname1<br />
<span>        </span>{<br />
<span>            </span>get<br />
<span>            </span>{<br />
<span>                </span>return cname;<br />
<span>            </span>}<br />
<span>            </span>set<br />
<span>            </span>{<br />
<span>                </span>cname = value;<br />
<span>            </span>}<br />
<span>        </span>}<br />
<span>        </span>public string country1<br />
<span>        </span>{<br />
<span>            </span>get<br />
<span>            </span>{<br />
<span>                </span>return country;<br />
<span>            </span>}<br />
<span>            </span>set<br />
<span>            </span>{<br />
<span>                </span>country = value;<br />
<span>            </span>}<br />
<span>        </span>}<br />
<span>        </span>public cricket(int no1, string cname1, string country1)<br />
<span>        </span>{<br />
<span>            </span>this.no = no1;<br />
<span>            </span>this.cname = cname1;<br />
<span>            </span>this.country = country1;<br />
<span>        </span>}</p>
<p><span>    </span>}//end of cricket class</p>
<p><span>    </span>protected void Page_Load(object sender, EventArgs e)<br />
<span>   </span><span> </span>{<br />
<span>        </span>System.Collections.Generic.List&lt;cricket&gt; cric = new System.Collections.Generic.List&lt;cricket&gt;();<br />
<span>        </span>cric.Add(new cricket(1, &#8220;dhoni&#8221;, &#8220;india&#8221;));<br />
<span>        </span>cric.Add(new cricket(1, &#8220;afridi&#8221;, &#8220;pak&#8221;));<br />
<span>        </span>cric.Add(new cricket(1, &#8220;mindas&#8221;, &#8220;sl&#8221;));<br />
<span>        </span>GridView1.DataSource = cric;<br />
<span>        </span>GridView1.DataBind();<span>    </span>}<br />
}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:small;font-family:Arial;"> </span></p>
</div>
<table class="MsoNormalTable" style="background:white;border:gray 1.5pt solid;" border="1" cellspacing="5" cellpadding="0">
<tbody>
<tr>
<td style="background-color:transparent;border:gray;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:7.5pt;color:black;font-family:&quot;">Generic Class</span></strong><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:7.5pt;color:black;font-family:&quot;">Nongeneric Counterpart</span></strong><span style="font-size:7.5pt;color:black;font-family:&quot;"><br />
in System.Collections </span></td>
<td style="background-color:transparent;border:gray;padding:3.75pt;" valign="bottom">
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:7.5pt;color:black;font-family:&quot;">Meaning in Life</span></strong><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">Collection&lt;T&gt;</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">CollectionBase</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:7.5pt;color:black;font-family:&quot;">The basis for a generic collection </span></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">Comparer&lt;T&gt;</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">Comparer</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:7.5pt;color:black;font-family:&quot;">Compares two generic objects for equality </span></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">Dictionary&lt;K, V&gt;</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">Hashtable</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:7.5pt;color:black;font-family:&quot;">A generic collection of name/value pairs </span></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">List&lt;T&gt;</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">ArrayList</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:7.5pt;color:black;font-family:&quot;">A dynamically resizable list of items </span></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">Queue&lt;T&gt;</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">Queue</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:7.5pt;color:black;font-family:&quot;">A generic implementation of a first-in, first-out (FIFO) list </span></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">SortedDictionary&lt;K, V&gt;</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">SortedList</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:7.5pt;color:black;font-family:&quot;">A generic implementation of a sorted set of name/value pairs </span></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">Stack&lt;T&gt;</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">Stack</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:7.5pt;color:black;font-family:&quot;">A generic implementation of a last-in, first-out (LIFO) list </span></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">LinkedList&lt;T&gt;</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:7.5pt;color:black;font-family:&quot;">N/A </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:7.5pt;color:black;font-family:&quot;">A generic implementation of a doubly linked list </span></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">ReadOnlyCollection&lt;T&gt;</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:navy;font-family:&quot;">ReadOnlyCollectionBase</span><span style="font-size:7.5pt;color:black;font-family:&quot;"> </span></p>
</td>
<td style="background-color:transparent;border:gray;padding:3.75pt;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:7.5pt;color:black;font-family:&quot;">A generic implementation of a set of read-only items </span></p>
</td>
</tr>
</tbody>
</table>
<div style="border-right:medium none;border-top:windowtext 1pt solid;border-left:medium none;border-bottom:medium none;padding:1pt 0 0;">
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:8pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:8pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:8pt;font-family:&quot;"> </span></p>
</div>
<table class="MsoNormalTable" style="width:100%;" border="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="background-color:transparent;border:#d4d0c8;padding:.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:0 0 6pt;"><span style="font-size:small;font-family:Arial;">C# is a strongly typed language, i.e., objects in C# should have a type prior to holding any value. This enforces language interoperability and </span><a href="http://aspalliance.com/1100_Using_Generics_in_C.all" target="_top"><span class="klink"><span style="text-decoration:underline;"><span style="font-size:10pt;font-family:&quot;"><span>security</span></span></span></span></a><span style="font-size:small;font-family:Arial;"> but restricts the programmer to specify the type of an object at the time of writing the program as the type of an object in C# cannot be determined at runtime. Generics are a new concept that has been introduced with C# 2.0 and it helps us to defer the binding of a generic type to a </span><a href="http://aspalliance.com/1100_Using_Generics_in_C.all" target="_top"><span class="klink"><span style="text-decoration:underline;"><span style="font-size:10pt;font-family:&quot;"><span>data type</span></span></span></span></a><span style="font-size:small;"><span style="font-family:Arial;"> until its point of usage arrives. It is one of the most powerful and anticipated feature of the C# 2.0 language. The basic idea behind generics is to develop universal classes and methods that can accept a type as a parameter to promote reusability, efficiency and maintainability of code. This article discusses Generics, its usage, merits and demerits with code examples wherever necessary. <span style="font-size:12pt;"></span></span></span></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#d4d0c8;padding:.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:8pt;color:#cc0000;font-family:&quot;">What are Generics?</span></strong></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#d4d0c8;padding:.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:8pt;font-family:&quot;">[ <a href="http://aspalliance.com/1100_Using_Generics_in_C.all#top"><span style="font-family:&quot;">Back To Top</span></a> ]</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:small;"><span style="font-family:Arial;"><span>   </span>According to MSDN, &#8220;Generics introduce to the .NET Framework the concept of type parameters, which make it possible to design classes and methods that defer the specification of one or more types until the class or method is declared and instantiated by client code.&#8221; By using Generics, classes and methods can work uniformly on the values of different types. Generics facilitate type safety, improved performance and reduced code. It promotes the usage of parameterized types on our types and is also known as parametric polymorphism. The Common Language Runtime (CLR) compiles any Generic type to IL and Metadata as it does with the other types; but it stores added information pertaining to the generic types which is used to bind the generic type to a specific type at runtime when the generic type is instantiated. Note that for generic types that are bound to value types, the generic types are instantiated for each value type that it is bound to. Unlike this, for generic types that are bond to reference types, the generic type instance refers to the location in memory of the reference type to which it is bound for all the instances of the generic type. The following </span></span><a href="http://aspalliance.com/1100_Using_Generics_in_C.all" target="_top"><span class="klink"><span style="text-decoration:underline;"><span style="font-size:10pt;font-family:&quot;"><span>code snippet</span></span></span></span></a><span style="font-size:small;font-family:Arial;"> in Listing 1 illustrates how a generic type can be implemented.</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:small;"><span style="font-family:Arial;"><span> </span>Listing 1</span></span></p>
<pre><span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:blue;">public</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">class</span><span style="font-size:8.5pt;color:black;"> Test&lt;T&gt; </span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">{</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">    </span><span style="font-size:8.5pt;color:blue;">public</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">void</span><span style="font-size:8.5pt;color:black;"> Display() </span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">      {</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">          </span><span style="font-size:8.5pt;color:green;">//Some code</span><span style="font-size:8.5pt;color:black;"></span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">      }</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:green;">//Other members</span><span style="font-size:8.5pt;color:black;"></span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">}</span></span></pre>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:small;font-family:Arial;">We may say that the type parameter is an unbound type as it is not bound to any specific type. When we instantiate this class, the generic type has to be bound to a particular type as shown in the code snippet in Listing 2.</span></p>
<p class="codelistingheading" style="margin:0;"><strong><span style="text-decoration:underline;"><span style="font-size:x-small;font-family:Verdana;">Listing 2</span></span></strong></p>
<pre><span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">Test&lt;</span><span style="font-size:8.5pt;color:blue;">int</span><span style="font-size:8.5pt;color:black;">&gt; test </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">new</span><span style="font-size:8.5pt;color:black;"> Test&lt;</span><span style="font-size:8.5pt;color:blue;">int</span><span style="font-size:8.5pt;color:black;">&gt;();</span></span></pre>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:small;font-family:Arial;">Note that in the code snippet above, the resulting type called &#8220;test&#8221; is a bound type. The code example in Listing 3 shows how we can use a generic method on varied types.</span></p>
<p class="codelistingheading" style="margin:0;"><strong><span style="text-decoration:underline;"><span style="font-size:x-small;font-family:Verdana;">Listing 3: Implementing a generic method</span></span></strong></p>
<pre><span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:blue;">using</span><span style="font-size:8.5pt;color:black;"> <a href="http://aspalliance.com/1100_Using_Generics_in_C.all" target="_top"><span class="klink"><span style="text-decoration:underline;"><span><span><span style="font-family:Arial;">System</span></span></span></span></span></a>;  </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:blue;">using</span><span style="font-size:8.5pt;color:black;"> System.Collections.Generic;  </span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;"> </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">   </span><span style="font-size:8.5pt;color:blue;">class</span><span style="font-size:8.5pt;color:black;"> Test  </span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">   {  </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">      </span><span style="font-size:8.5pt;color:blue;">static</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">void</span><span style="font-size:8.5pt;color:black;"> Main( </span><span style="font-size:8.5pt;color:blue;">string</span><span style="font-size:8.5pt;color:black;">[] args )  </span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">      {  </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        Test t </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">new</span><span style="font-size:8.5pt;color:black;"> Test();</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">int</span><span style="font-size:8.5pt;color:black;">[] integerArray </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> {1,2,3,4,5,6};  </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">char</span><span style="font-size:8.5pt;color:black;">[] characterArray </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> { 'J', 'O', 'Y', 'D', 'I','P' };   </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">double</span><span style="font-size:8.5pt;color:black;">[] doubleArray </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> {0.1,0.2,0.3,0.4,0.5,0.6};  </span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">         Console.WriteLine( </span></span><span style="font-size:8.5pt;background:#e4e4e4;color:#666666;">"Displaying the contents of the integer array:--"</span><span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;"> );  </span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">         t.Display(integerArray);</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">         Console.WriteLine( </span></span><span style="font-size:8.5pt;background:#e4e4e4;color:#666666;">"Displaying the contents of the character array:--"</span><span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;"> );</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">         t.Display(characterArray);</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">         Console.WriteLine( </span></span><span style="font-size:8.5pt;background:#e4e4e4;color:#666666;">"Displaying the contents of the double array:--"</span><span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;"> );</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">         t.Display(doubleArray);</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">      }   </span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">     </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">      </span><span style="font-size:8.5pt;color:blue;">public</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">void</span><span style="font-size:8.5pt;color:black;"> Display&lt; GenericArray &gt;( GenericArray[] array )  </span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">      {  </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">         </span><span style="font-size:8.5pt;color:blue;">for</span><span style="font-size:8.5pt;color:black;"> (</span><span style="font-size:8.5pt;color:blue;">int</span><span style="font-size:8.5pt;color:black;"> i </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> 0; i&lt; array.Length; i++)  </span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">            Console.WriteLine(array[i]);  </span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">      }</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">   }</span></span></pre>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:small;font-family:Arial;">The following points sum up the basic advantages of using Generics.</span></p>
<p class="MsoListBullet" style="margin:0 0 6pt .25in;"><span style="font-family:Symbol;"><span style="font-size:x-small;">·</span></span><span style="font-size:7pt;font-family:&quot;">         </span><span style="font-size:x-small;font-family:Verdana;">Code Efficiency</span></p>
<p class="MsoListBullet" style="margin:0 0 6pt .25in;"><span style="font-family:Symbol;"><span style="font-size:x-small;">·</span></span><span style="font-size:7pt;font-family:&quot;">         </span><span style="font-size:x-small;font-family:Verdana;">Enhanced performance</span></p>
<p class="MsoListBullet" style="margin:0 0 6pt .25in;"><span style="font-family:Symbol;"><span style="font-size:x-small;">·</span></span><span style="font-size:7pt;font-family:&quot;">         </span><span style="font-size:x-small;font-family:Verdana;">Type Safety and reliability</span></p>
<p class="MsoListBullet" style="margin:0 0 6pt .25in;"><span style="font-family:Symbol;"><span style="font-size:x-small;">·</span></span><span style="font-size:7pt;font-family:&quot;">         </span><span style="font-size:x-small;font-family:Verdana;">Maintainability of code</span></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#d4d0c8;padding:.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:8pt;color:#cc0000;font-family:&quot;">How does C# Generics and C++ Templates compare?</span></strong></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#d4d0c8;padding:.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:8pt;font-family:&quot;">[ <a href="http://aspalliance.com/1100_Using_Generics_in_C.all#top"><span style="font-family:&quot;">Back To Top</span></a> ]</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:small;"><span style="font-family:Arial;"><span>     </span>According to MSDN, &#8220;Generics and templates are both language features that provide </span></span><a href="http://aspalliance.com/1100_Using_Generics_in_C.all" target="_top"><span class="klink"><span style="text-decoration:underline;"><span style="font-size:10pt;font-family:&quot;"><span>s<span>upport</span></span></span></span></span></a><span style="font-size:small;"><span style="font-family:Arial;"> for parameterized types. However, they are different and have different uses.&#8221; C# generics and templates in C++ are more or less similar syntactically. However, there are some notable differences between them. C# Generic types are strong typed and they are instantiated at the runtime whereas C++ Templates are loosely typed and they are instantiated at the compile time only. Further, unlike C++ templates, Generics do not permit the type parameters to have default values.<span style="font-size:12pt;font-family:&quot;"></span></span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 6pt;"><span style="font-size:small;"><span style="font-family:Arial;">MSDN states, &#8220;C++ templates use a compile-time model. When a template is used in a C++ program, the effect is as if a sophisticated macro processor had been used. C# generics are not just a feature of the compiler, but also a feature of the runtime. A generic type such as List&lt;T&gt; maintains its generic-ness (genericity) after it has been compiled. Or, to look at it another way, the substitution that the C++ compiler does at compile time is done at JIT time in the C# generic world.&#8221;<span style="font-size:12pt;"></span></span></span></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#d4d0c8;padding:.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:8pt;color:#cc0000;font-family:&quot;">The System.Collections.Generic Namespace</span></strong></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#d4d0c8;padding:.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:small;font-family:Arial;">The System.Collections.Generic namespace contains several generic collection classes based on generics and it is recommended that we should use these collection classes in lieu of the earlier non-generic ones for better performance of our </span><a href="http://aspalliance.com/1100_Using_Generics_in_C.all" target="_top"><span class="klink"><span style="text-decoration:underline;"><span style="font-size:10pt;font-family:&quot;"><span>applications</span></span></span></span></a><span style="font-size:small;"><span style="font-family:Arial;">. <span style="font-size:12pt;font-family:&quot;"></span></span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:small;font-family:Arial;">According to MSDN, &#8220;The System.Collections.Generic namespace contains </span><a href="http://aspalliance.com/1100_Using_Generics_in_C.all" target="_top"><span class="klink"><span style="text-decoration:underline;"><span style="font-size:10pt;font-family:&quot;"><span>interfaces</span></span></span></span></a><span style="font-size:small;font-family:Arial;"> and classes that define generic collections, which allow users to create strongly typed collections that provide better type safety and performance than non-generic strongly typed collections.&#8221; </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 6pt;"><span style="font-size:small;"><span style="font-family:Arial;">Note that the System.Collections.Generic.ICollection&lt;T&gt; interface is the base interface for all the classes in the System.Collections.Generic namespace.<span style="font-size:12pt;"></span></span></span></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#d4d0c8;padding:.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:8pt;color:#cc0000;font-family:&quot;">Implementing a Generic Stack Class</span></strong></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#d4d0c8;padding:.75pt;" valign="top">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:small;"><span style="font-family:Arial;">Let us understand the Generics with a simple example. Here I have implemented a stack in two different ways. A stack that can be recollected, works in the LIFO (Last-In-First-Out) principle. If we implement a stack that can accept any data type or object and store the same in to it, we have to opt for an object based stack (obviously if we are not using Generics). I have given here two code examples of a partial implementation of a stack. <span style="font-size:12pt;font-family:&quot;"></span></span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:small;font-family:Arial;">The first one is an object based stack and the next a generic stack. The object based stack would require boxing and unboxing </span><a href="http://aspalliance.com/1100_Using_Generics_in_C.all" target="_top"><span class="klink"><span style="text-decoration:underline;"><span style="font-size:10pt;font-family:&quot;"><span>operations</span></span></span></span></a><span style="font-size:small;font-family:Arial;"> to store and return objects in and out of the stack, but the generic stack (the one that uses C# Generics) would not. Hence, as far as performance is concerned, the generic stack is the better choice. </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:small;font-family:Arial;">The code in Listing 4 is an example of an object based stack. Note that we can store any type of data in this stack, but we need to perform an explicit cast in order to retrieve the right type of the object that was stored using boxing and unboxing. This can be a significant performance overhead.</span></p>
<p class="codelistingheading" style="margin:0;"><strong><span style="text-decoration:underline;"><span style="font-size:x-small;font-family:Verdana;">Listing 4</span></span></strong></p>
<pre><span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:blue;">using</span><span style="font-size:8.5pt;color:black;"> System;</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:blue;">using</span><span style="font-size:8.5pt;color:black;"> System.Collections.Generic;</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:blue;">using</span><span style="font-size:8.5pt;color:black;"> System.Text;</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;"> </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:blue;">namespace</span><span style="font-size:8.5pt;color:black;"> Generics</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">{</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">    </span><span style="font-size:8.5pt;color:blue;">public</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">class</span><span style="font-size:8.5pt;color:black;"> CustomStack</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">    {</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">const</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">int</span><span style="font-size:8.5pt;color:black;"> size </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> 10;</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">private</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">object</span><span style="font-size:8.5pt;color:black;">[] register;</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;"> </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">private</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">int</span><span style="font-size:8.5pt;color:black;"> count </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> 0;</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;"> </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">private</span><span style="font-size:8.5pt;color:black;"> CustomStack()</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        {</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">            register </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">new</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">object</span><span style="font-size:8.5pt;color:black;">[size];</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        }</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">public</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">void</span><span style="font-size:8.5pt;color:black;"> Push(</span><span style="font-size:8.5pt;color:blue;">object</span><span style="font-size:8.5pt;color:black;"> x)</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        {</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">            </span><span style="font-size:8.5pt;color:blue;">if</span><span style="font-size:8.5pt;color:black;"> (count &lt; size)</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">                register[count++] </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> x;</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        }</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">public</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">object</span><span style="font-size:8.5pt;color:black;"> Pop()</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        {</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">            </span><span style="font-size:8.5pt;color:blue;">return</span><span style="font-size:8.5pt;color:black;"> register[--count];</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        }</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">static</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">void</span><span style="font-size:8.5pt;color:black;"> Main(</span><span style="font-size:8.5pt;color:blue;">string</span><span style="font-size:8.5pt;color:black;">[] args)</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        {</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">            CustomStack intStack </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">new</span><span style="font-size:8.5pt;color:black;"> CustomStack();</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">            intStack.Push(10);</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">            </span><span style="font-size:8.5pt;color:blue;">int</span><span style="font-size:8.5pt;color:black;"> i </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> (</span><span style="font-size:8.5pt;color:blue;">int</span><span style="font-size:8.5pt;color:black;">)intStack.Pop();</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">            Console.WriteLine(i);</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">            Console.Read();</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        }</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">    }</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">}</span></span></pre>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:small;font-family:Arial;">When using the object based stack shown in Listing 1, you have to box and unbox the elements in order to push and pop them in and out of the stack resulting in a significant performance drawback. Now, Generics comes to the rescue. It is much more flexible and removes the overhead involved in boxing and unboxing operations that we discussed earlier as a generic type is assigned a specific type only at runtime. The type checks are done at the compile time itself. Hence, the generic stack in our example works much faster compared to its non-generic counterpart. The following is the implementation of a generic stack using C# Generics.</span></p>
<p class="codelistingheading" style="margin:0;"><strong><span style="text-decoration:underline;"><span style="font-size:x-small;font-family:Verdana;">Listing 5</span></span></strong></p>
<pre><span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:blue;">using</span><span style="font-size:8.5pt;color:black;"> System;</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:blue;">using</span><span style="font-size:8.5pt;color:black;"> System.Collections.Generic;</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:blue;">using</span><span style="font-size:8.5pt;color:black;"> System.Text;</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;"> </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:blue;">namespace</span><span style="font-size:8.5pt;color:black;"> Generics</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">{</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">    </span><span style="font-size:8.5pt;color:blue;">public</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">class</span><span style="font-size:8.5pt;color:black;"> CustomStack&lt;S&gt;</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">    {</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">const</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">int</span><span style="font-size:8.5pt;color:black;"> size </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> 10;</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">private</span><span style="font-size:8.5pt;color:black;"> S[] register;</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">private</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">int</span><span style="font-size:8.5pt;color:black;"> count </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> 0;</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;"> </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">public</span><span style="font-size:8.5pt;color:black;"> CustomStack()</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        {</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">            register </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">new</span><span style="font-size:8.5pt;color:black;"> S[size];</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        }</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;"> </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">public</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">void</span><span style="font-size:8.5pt;color:black;"> Push(S x)</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        {</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">            </span><span style="font-size:8.5pt;color:blue;">if</span><span style="font-size:8.5pt;color:black;"> (count &lt; size)</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">                register[count++] </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> x;</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        }</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;"> </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">public</span><span style="font-size:8.5pt;color:black;"> S Pop()</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        {</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">            </span><span style="font-size:8.5pt;color:blue;">return</span><span style="font-size:8.5pt;color:black;"> register[--count];</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        }     </span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">   }</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;"> </span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">    </span><span style="font-size:8.5pt;color:blue;">public</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">class</span><span style="font-size:8.5pt;color:black;"> Test</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">    {</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">        </span><span style="font-size:8.5pt;color:blue;">static</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">void</span><span style="font-size:8.5pt;color:black;"> Main(</span><span style="font-size:8.5pt;color:blue;">string</span><span style="font-size:8.5pt;color:black;">[] args)</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        {</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">            CustomStack&lt;</span><span style="font-size:8.5pt;color:blue;">int</span><span style="font-size:8.5pt;color:black;">&gt; intStack </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> </span><span style="font-size:8.5pt;color:blue;">new</span><span style="font-size:8.5pt;color:black;"> CustomStack&lt;</span><span style="font-size:8.5pt;color:blue;">int</span><span style="font-size:8.5pt;color:black;">&gt;();</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">            intStack.Push(10);</span></span>
<span style="background-color:#fbedbb;"><span style="font-size:8.5pt;color:black;">            </span><span style="font-size:8.5pt;color:blue;">int</span><span style="font-size:8.5pt;color:black;"> i </span><span style="font-size:8.5pt;color:red;">=</span><span style="font-size:8.5pt;color:black;"> intStack.Pop();</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">            Console.WriteLine(i);</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">            Console.Read();</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">        }</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">    }</span></span>
<span style="font-size:8.5pt;color:black;"><span style="background-color:#fbedbb;">}</span></span></pre>
</td>
</tr>
</tbody>
</table>
<div style="border-right:medium none;border-top:windowtext 1pt solid;border-left:medium none;border-bottom:medium none;padding:1pt 0 0;">
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:8pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:8pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:8pt;font-family:&quot;"> </span></p>
</div>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;font-family:&quot;">Generics are the most useful C# 2.0 language extensions, beside Anonymous methods, Iterators, Partial types And Nullable types.</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:black;font-family:&quot;">Generics were added to version 2.0 of the C# language and the common language runtime (CLR). Generics introduce to the .NET Framework the concept of type parameters, which make it possible to design classes and methods that defer the specification of one or more types until the class or method is declared and instantiated by client code. For example, by using a generic type parameter T you can write a single class that other client code can use without incurring the cost or risk of runtime casts or boxing operations, as shown here:</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><strong><span style="font-size:10pt;font-family:&quot;">What are generics?</span></strong><strong><span style="font-size:10pt;font-family:&quot;"><br />
</span></strong><span style="font-size:10pt;font-family:&quot;"><br />
Generics permit classes, structs, interfaces, delegates, and methods to be parameterized by the types of data they store and manipulate.</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><strong><span style="font-size:10pt;font-family:&quot;">Why generics?</span></strong><strong><span style="font-size:10pt;font-family:&quot;"><br />
</span></strong><span style="font-size:10pt;font-family:&quot;"><br />
To well know the useful of generics lets examine the following code:<span style="color:blue;"></span></span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">public</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">class</span> Stack<br />
{<br />
<span style="color:blue;">object</span>[] items;<br />
<span style="color:blue;">int</span> count;<br />
<span style="color:blue;">public</span> <span style="color:blue;">void</span> Push(<span style="color:blue;">object</span> item) {&#8230;}<br />
<span style="color:blue;">public</span> <span style="color:blue;">object</span> Pop() {&#8230;}<br />
} </span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;font-family:&quot;">We use the object type to store any type of data. The above simple Stack class stores its data in an object array, and its two methods, Push and Pop, use object to accept and return data. While the use of type object makes the Stack class very flexible, it is not without drawbacks. For example, it is possible to push a value of any type, such a Customer instance, onto a stack.</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;font-family:&quot;">However, when a value is retrieved, the result of the Pop method must explicitly be cast back to the appropriate type, which is tedious to write and carries a performance penalty for run-time type checking: </span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;font-family:&quot;">Stack stack = <span style="color:blue;">new</span> Stack();<br />
stack.Push(<span style="color:blue;">new</span> Customer());<br />
Customer c = (Customer)stack.Pop(); </span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;font-family:&quot;">If a value of a value type, such as an int, is passed to the Push method, it is automatically boxed. When the int is later retrieved, it must be unboxed with an explicit type cast:</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;font-family:&quot;">Stack stack = <span style="color:blue;">new</span> Stack();<br />
stack.Push(3);<br />
<span style="color:blue;">int</span> i = (<span style="color:blue;">int</span>)stack.Pop();</p>
<p>Such boxing and unboxing operations add performance overhead since they involve dynamic memory allocations and run-time type checks.</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;font-family:&quot;">A further issue with the Stack class is that it is not possible to enforce the kind of data placed on a stack. Indeed, a Customer instance can be pushed on a stack and then accidentally cast it to the wrong type after it is retrieved:</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;font-family:&quot;">Stack stack = <span style="color:blue;">new</span> Stack();<br />
stack.Push(<span style="color:blue;">new</span> Customer());<br />
<span style="color:blue;">string</span> s = (<span style="color:blue;">string</span>)stack.Pop(); </span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;font-family:&quot;">While the code above is an improper use of the Stack class, the code is technically speaking correct and a compile-time error is not reported. The problem does not become apparent until the code is executed, at which point an InvalidCastException is thrown.</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;font-family:&quot;">With generics those problems are all solved. HOW&#8230;?</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">public</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">class</span> Stack&lt;T&gt;<br />
{<br />
T[] items;<br />
<span style="color:blue;">int</span> count;<br />
<span style="color:blue;">public</span> <span style="color:blue;">void</span> Push(T item) {&#8230;}<br />
<span style="color:blue;">public</span> T Pop() {&#8230;}<br />
}</p>
<p>When the generic class Stack&lt;T&gt; is used, the actual type to substitute for T is specified. In the following example, int is given as the type argument for T:</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;font-family:&quot;">Stack&lt;<span style="color:blue;">int</span>&gt; stack = <span style="color:blue;">new</span> Stack&lt;<span style="color:blue;">int</span>&gt;();<br />
stack.Push(3);<br />
<span style="color:blue;">int</span> x = stack.Pop(); </p>
<p></span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;font-family:&quot;">The Stack&lt;int&gt; type is called a constructed type. In the Stack&lt;int&gt; type, every occurrence of T is replaced with the type argument int. When an instance of Stack&lt;int&gt; is created, the native storage of the items array is an int[] rather than object[], providing substantial storage efficiency compared to the non-generic Stack. Likewise, the Push and Pop methods of a Stack&lt;int&gt; operate on int values, making it a compile-time error to push values of other types onto the stack, and eliminating the need to explicitly cast values back to their original type when they&#8217;re retrieved.</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;font-family:&quot;">Generics provide strong typing, meaning for example that it is an error to push an int onto a stack of Customer objects. Just as a Stack&lt;int&gt; is restricted to operate only on int values, so is Stack&lt;Customer&gt; restricted to Customer objects, and the compiler will report errors on the last two lines of the following example:</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;font-family:&quot;">Stack&lt;Customer&gt; stack = <span style="color:blue;">new</span> Stack&lt;Customer&gt;();<br />
stack.Push(<span style="color:blue;">new</span> Customer());<br />
Customer c = stack.Pop();<br />
stack.Push(3); <span style="color:green;">// Type mismatch error<br />
</span><span style="color:blue;">int</span> x = stack.Pop(); <span style="color:green;">// Type mismatch error</p>
<p></span>It was a breif introduction to generics that will be included in the next version of C# (V 2.0) . which is available now on its beta version with Visual C# 2005 Express Edition Beta 1.</span></p>
<div style="border-right:medium none;border-top:windowtext 1pt solid;border-left:medium none;border-bottom:medium none;padding:1pt 0 0;">
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:8pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:8pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:8pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:10pt;font-family:&quot;">List<span>  </span>Example:</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
</div>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">Iam beginner using LIST. After study the many example, so far i&#8217;ve have below class</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">public</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">class</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:teal;font-family:&quot;">ShoppingCartItem</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">{</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:green;font-family:&quot;">//TrxNo</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">private</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">int</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> _trxNo = 0;</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">public</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">int</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> TrxNo</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">{</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">get</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> { </span><span style="font-size:10pt;color:blue;font-family:&quot;">return</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> _trxNo; }</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">set</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> { _trxNo = </span><span style="font-size:10pt;color:blue;font-family:&quot;">value</span><span style="font-size:10pt;color:#464952;font-family:&quot;">; }</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">}</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:green;font-family:&quot;">//Order Date</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">private</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">string</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> _OrdDate = </span><span style="font-size:10pt;color:maroon;font-family:&quot;">&#8220;&#8221;</span><span style="font-size:10pt;color:#464952;font-family:&quot;">;</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">public</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">string</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> OrdDate</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">{</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">get</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> { </span><span style="font-size:10pt;color:blue;font-family:&quot;">return</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> _OrdDate; }</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">private</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">set</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> { _OrdDate = </span><span style="font-size:10pt;color:blue;font-family:&quot;">value</span><span style="font-size:10pt;color:#464952;font-family:&quot;">; }</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">}</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:green;font-family:&quot;">//Product ID</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">private</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">string</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> _id = </span><span style="font-size:10pt;color:maroon;font-family:&quot;">&#8220;&#8221;</span><span style="font-size:10pt;color:#464952;font-family:&quot;">;</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">public</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">string</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> ID</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">{</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">get</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> { </span><span style="font-size:10pt;color:blue;font-family:&quot;">return</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> _id; }</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">private</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">set</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> { _id = </span><span style="font-size:10pt;color:blue;font-family:&quot;">value</span><span style="font-size:10pt;color:#464952;font-family:&quot;">; }</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">}</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:green;font-family:&quot;">//Product Description</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">private</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">string</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> _Desc = </span><span style="font-size:10pt;color:maroon;font-family:&quot;">&#8220;&#8221;</span><span style="font-size:10pt;color:#464952;font-family:&quot;">;</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">public</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">string</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> Desc</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">{</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">get</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> { </span><span style="font-size:10pt;color:blue;font-family:&quot;">return</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> _Desc; }</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">private</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">set</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> { _Desc = </span><span style="font-size:10pt;color:blue;font-family:&quot;">value</span><span style="font-size:10pt;color:#464952;font-family:&quot;">; }</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">}</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:green;font-family:&quot;">//Quantity</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">private</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">int</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> _quantity = 1;</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">public</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">int</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> Quantity</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">{</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">get</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> { </span><span style="font-size:10pt;color:blue;font-family:&quot;">return</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> _quantity; }</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">set</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> { _quantity = </span><span style="font-size:10pt;color:blue;font-family:&quot;">value</span><span style="font-size:10pt;color:#464952;font-family:&quot;">; }</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">}</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:green;font-family:&quot;">//Price Per Unit</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">private</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">decimal</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> _unitPrice;</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">public</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">decimal</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> UnitPrice</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">{</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">get</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> { </span><span style="font-size:10pt;color:blue;font-family:&quot;">return</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> _unitPrice; }</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">private</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">set</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> { _unitPrice = </span><span style="font-size:10pt;color:blue;font-family:&quot;">value</span><span style="font-size:10pt;color:#464952;font-family:&quot;">; }</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">}</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">private</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">decimal</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> _subTotal;</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">public</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">decimal</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> SubTotal {</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">get</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> { </span><span style="font-size:10pt;color:blue;font-family:&quot;">return</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> _subTotal; }</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">private</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:blue;font-family:&quot;">set</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> { _subTotal = </span><span style="font-size:10pt;color:blue;font-family:&quot;">value</span><span style="font-size:10pt;color:#464952;font-family:&quot;">; }</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">}</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">public</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> ShoppingCartItem(</span><span style="font-size:10pt;color:blue;font-family:&quot;">int</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> trxno,</span><span style="font-size:10pt;color:blue;font-family:&quot;">string</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> ordDate, </span><span style="font-size:10pt;color:blue;font-family:&quot;">string</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> id, </span><span style="font-size:10pt;color:blue;font-family:&quot;">string</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> desc, </span><span style="font-size:10pt;color:blue;font-family:&quot;">int</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> quantity, </span><span style="font-size:10pt;color:blue;font-family:&quot;">decimal</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> unitPrice, decimal subTotal)</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">{</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">this</span><span style="font-size:10pt;color:#464952;font-family:&quot;">.TrxNo = trxno;</span><span style="font-size:10pt;color:green;font-family:&quot;">//UniqueID</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">this</span><span style="font-size:10pt;color:#464952;font-family:&quot;">.OrdDate = ordDate;</span><span style="font-size:10pt;color:green;font-family:&quot;">//Order Date</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">this</span><span style="font-size:10pt;color:#464952;font-family:&quot;">.ID = id;</span><span style="font-size:10pt;color:green;font-family:&quot;">//Product ID</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">this</span><span style="font-size:10pt;color:#464952;font-family:&quot;">.Desc = desc;</span><span style="font-size:10pt;color:green;font-family:&quot;">//Product Description</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">this</span><span style="font-size:10pt;color:#464952;font-family:&quot;">.Quantity = quantity;</span><span style="font-size:10pt;color:green;font-family:&quot;">//Order Quantity</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">this</span><span style="font-size:10pt;color:#464952;font-family:&quot;">.UnitPrice = unitPrice;</span><span style="font-size:10pt;color:green;font-family:&quot;">//Price Per Quantity</span><span style="font-size:8pt;color:#464952;font-family:&quot;"></span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:blue;font-family:&quot;">this</span><span style="font-size:10pt;color:black;font-family:&quot;">.SubTotal = subTotal;</span><span style="font-size:10pt;color:green;font-family:&quot;">//Price Per Quantity</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">}</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">}</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">For insert into the LIST, i&#8217;ve using </span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">order.Add(</span><span style="font-size:10pt;color:blue;font-family:&quot;">new</span><span style="font-size:10pt;color:#464952;font-family:&quot;"> </span><span style="font-size:10pt;color:teal;font-family:&quot;">ShoppingCartItem</span><span style="font-size:10pt;color:#464952;font-family:&quot;">(</span><span style="font-size:10pt;color:teal;font-family:&quot;">Convert</span><span style="font-size:10pt;color:#464952;font-family:&quot;">.ToInt32(Request.QueryString[</span><span style="font-size:10pt;color:maroon;font-family:&quot;">"trxNo"</span><span style="font-size:10pt;color:#464952;font-family:&quot;">]), Request.QueryString[</span><span style="font-size:10pt;color:maroon;font-family:&quot;">"ordDate"</span><span style="font-size:10pt;color:#464952;font-family:&quot;">],</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">Request.QueryString[</span><span style="font-size:10pt;color:maroon;font-family:&quot;">"id"</span><span style="font-size:10pt;color:#464952;font-family:&quot;">], Request.QueryString[</span><span style="font-size:10pt;color:maroon;font-family:&quot;">"desc"</span><span style="font-size:10pt;color:#464952;font-family:&quot;">], </span><span style="font-size:10pt;color:teal;font-family:&quot;">Convert</span><span style="font-size:10pt;color:#464952;font-family:&quot;">.ToInt32(Request.QueryString[</span><span style="font-size:10pt;color:maroon;font-family:&quot;">"quantity"</span><span style="font-size:10pt;color:#464952;font-family:&quot;">]),</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:teal;font-family:&quot;">Convert</span><span style="font-size:10pt;color:#464952;font-family:&quot;">.ToDecimal(Request.QueryString[</span><span style="font-size:10pt;color:maroon;font-family:&quot;">"priceperquantity"</span><span style="font-size:10pt;color:#464952;font-family:&quot;">], ,</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:teal;font-family:&quot;">Convert</span><span style="font-size:10pt;color:#464952;font-family:&quot;">.ToDecimal(Request.QueryString[</span><span style="font-size:10pt;color:maroon;font-family:&quot;">"subTotal"</span><span style="font-size:10pt;color:#464952;font-family:&quot;">])));</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">Session[</span><span style="font-size:10pt;color:maroon;font-family:&quot;">"Order"</span><span style="font-size:10pt;color:#464952;font-family:&quot;">] = order; // this all value will display using GridView.</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">Let&#8217;s say i&#8217;ve current LIST as follow,</span></p>
<p class="MsoNormal" style="vertical-align:top;line-height:normal;margin:0 0 10pt;"><span style="font-size:10pt;color:#464952;font-family:&quot;">TrxNo  | OrdDate  | ID    | Quantity     | PricePerQuantity       | SubTotal</span></p>
<div style="border-right:medium none;border-top:windowtext 1pt solid;border-left:medium none;border-bottom:medium none;padding:1pt 0 0;">
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:8pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:8pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:8pt;font-family:&quot;"> </span></p>
</div>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:9pt;color:black;font-family:&quot;">These interfaces are discussed in the same article for two reasons. These interfaces are frequently used together, and although the interfaces are similar (and have similar names), they serve different purposes.</p>
<p>If you have an array of types (such as <strong>string</strong> or <strong>integer</strong>) that already support <strong>IComparer</strong>, you can sort that array without providing any explicit reference to <strong>IComparer</strong>. In that case, the elements of the array are cast to the default implementation of <strong>IComparer</strong> (<strong>Comparer.Default</strong>) for you. However, if you want to provide sorting or comparison capability for your custom objects, you must implement either or both of these interfaces.</p>
<p>The following .NET Framework Class Library namespace is referenced in this article: </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:9pt;color:black;font-family:&quot;">System.Collections </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://support.microsoft.com/kb/320727#top"><span style="color:#07679a;"></span><span style="font-family:&quot;">Back to the top</span></a></span></p>
<p class="MsoNormal" style="line-height:normal;margin:11.25pt 0 3.75pt;"><strong><span style="font-size:9pt;color:black;font-family:&quot;">IComparable</span></strong></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:9pt;color:black;font-family:&quot;">The role of <strong>IComparable</strong> is to provide a method of comparing two objects of a particular type. This is necessary if you want to provide any ordering capability for your object. Think of <strong>IComparable</strong> as providing a default sort order for your objects. For example, if you have an array of objects of your type, and you call the <strong>Sort</strong> method on that array, <strong>IComparable</strong> provides the comparison of objects during the sort. When you implement the <strong>IComparable</strong> interface, you must implement the <strong>CompareTo</strong> method, as follows: </span></p>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;">// Implement IComparable CompareTo method - provide default sort order.</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;">int IComparable.CompareTo(object obj)</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;">{</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>   </span>car c=(car)obj;</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>   </span>return String.Compare(this.make,c.make);</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;">}</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>                                                             </span></span></pre>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:9pt;color:black;font-family:&quot;">The comparison in the method is different depending on the data type of the value that is being compared. <strong>String.Compare</strong> is used in this example because the property that is chosen for the comparison is a string.</p>
<p></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0 0 10pt;"><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://support.microsoft.com/kb/320727#top"><span style="color:#07679a;"></span><span style="font-family:&quot;">Back to the top</span></a></span></p>
<p class="MsoNormal" style="line-height:normal;margin:11.25pt 0 3.75pt;"><strong><span style="font-size:9pt;color:black;font-family:&quot;">IComparer</span></strong></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:9pt;color:black;font-family:&quot;"></span></strong><span style="font-size:9pt;color:black;font-family:&quot;">The role of <strong>IComparer</strong> is to provide additional comparison mechanisms. For example, you may want to provide ordering of your class on several fields or properties, ascending and descending order on the same field, or both. </p>
<p>Using <strong>IComparer</strong> is a two-step process. First, declare a class that implements <strong>IComparer</strong>, and then implement the <strong>Compare </strong>method:</span></p>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;">private class sortYearAscendingHelper : IComparer</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;">{</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>   </span>int IComparer.Compare(object a, object b)</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>   </span>{</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>      </span>car c1=(car)a;</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>      </span>car c2=(car)b;</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>      </span>if (c1.year &gt; c2.year)</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>   </span><span>      </span>return 1;</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>      </span>if (c1.year &lt; c2.year)</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>         </span>return -1;</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>      </span>else</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>         </span>return 0;</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>   </span>}</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;">}</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>                                                             </span></span></pre>
<p><span style="font-size:9pt;color:black;font-family:&quot;">Note that the <strong>IComparer.Compare</strong> method requires a tertiary comparison. 1, 0, or -1 is returned depending on whether one value is greater than, equal to, or less than the other. The sort order (ascending or descending) can be changed by switching the logical operators in this method.</p>
<p>The second step is to declare a method that returns an instance of your <strong>IComparer</strong> object: </span></p>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;">public static IComparer sortYearAscending()</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;">{<span>      </span></span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>   </span>return (IComparer) new sortYearAscendingHelper();</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;">}</span></pre>
<pre style="background:white;"><span style="color:#333333;font-family:&quot;"><span>                                                             </span></span></pre>
<p><span style="font-size:9pt;color:black;font-family:&quot;">In this example, the object is used as the second argument when you call the overloaded <strong>Array.Sort</strong> method that accepts <strong>IComparer</strong>. The use of <strong>IComparer</strong> is not limited to arrays. It is accepted as an argument in a number of different collection and control classes.</p>
<p></span></p>
<p><span style="font-size:9pt;color:black;font-family:&quot;"><a href="http://support.microsoft.com/kb/320727#top"><span style="color:#07679a;"></span><span style="font-family:&quot;">Back to the top</span></a></span></p>
<p><strong><span style="font-size:9pt;color:black;font-family:&quot;">Step-by-Step Example</span></strong></p>
<p><strong><span style="font-size:9pt;color:black;font-family:&quot;"></span></strong><span style="font-size:9pt;color:black;font-family:&quot;">The following example demonstrates the use of these interfaces. To demonstrate <strong>IComparer</strong> and <strong>IComparable</strong>, a class named <strong>car</strong> is created. The <strong>car</strong> object has the <strong>make</strong> and <strong>year</strong> properties. An ascending sort for the <strong>make</strong> field is enabled through the <strong>IComparable</strong> interface, and a descending sort on the <strong>make</strong> field is enabled through the <strong>IComparer</strong> interface. Both ascending and descending sorts are provided for the <strong>year</strong> property through the use of <strong>IComparer</strong>. </span></p>
<p class="MsoNormal" style="text-indent:-.25in;line-height:normal;margin:0 0 10pt .5in;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>1.<span style="font:7pt &quot;">    </span></span></span><span style="font-size:9pt;color:black;font-family:&quot;">In Visual C#, create a new Console Application project. Name the application ConsoleEnum. </span></p>
<p class="MsoNormal" style="text-indent:-.25in;line-height:normal;margin:0 0 10pt .5in;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>2.<span style="font:7pt &quot;">    </span></span></span><span style="font-size:9pt;color:black;font-family:&quot;">Rename Program.cs as Host.cs, and then replace the code with the following code.</p>
<p><strong>Note</strong> In Visual Studio .NET 2003, rename Class1.cs as Host.cs. </span></p>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>3.<span style="font:7pt &quot;">    </span></span></span><span style="color:#333333;font-family:&quot;">using System;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>4.<span style="font:7pt &quot;">    </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>5.<span style="font:7pt &quot;">    </span></span></span><span style="color:#333333;font-family:&quot;">namespace ConsoleEnum</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>6.<span style="font:7pt &quot;">    </span></span></span><span style="color:#333333;font-family:&quot;">{</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>7.<span style="font:7pt &quot;">    </span></span></span><span style="color:#333333;font-family:&quot;"><span>   </span>class host</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>8.<span style="font:7pt &quot;">    </span></span></span><span style="color:#333333;font-family:&quot;"><span>   </span>{</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>9.<span style="font:7pt &quot;">    </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>[STAThread]</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>10.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>static void Main(string[] args)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>11.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>{</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>12.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>// Create an arary of car objects.<span>      </span></span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>13.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>car[] arrayOfCars= new car[6]</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>14.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>{</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>15.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>new car("Ford",1992),</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>16.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>          </span><span>  </span>new car("Fiat",1988),</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>17.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>new car("Buick",1932),</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>18.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>new car("Ford",1932),</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>19.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>new car("Dodge",1999),</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>20.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>new car("Honda",1977)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>21.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>};</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>22.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span></span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>23.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>// Write out a header for the output.</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>24.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>Console.WriteLine("Array - Unsorted\n");</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>25.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>26.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>foreach(car c in arrayOfCars)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>27.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>Console.WriteLine(c.Make + "\t\t" + c.Year);</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>28.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span></span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>29.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>// Demo IComparable by sorting array with "default" sort order.</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>30.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>Array.Sort(arrayOfCars);</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>31.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>Console.WriteLine("\nArray - Sorted by Make (Ascending - IComparable)\n");</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>32.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>33.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>foreach(car c in arrayOfCars)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>34.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>Console.WriteLine(c.Make + "\t\t" + c.Year);</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>35.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>36.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>// Demo ascending sort of numeric value with IComparer.</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>37.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>Array.Sort(arrayOfCars,car.sortYearAscending());</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>38.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>Console.WriteLine("\nArray - Sorted by Year (Ascending - IComparer)\n");</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>39.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>40.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>foreach(car c in arrayOfCars)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>41.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>Console.WriteLine(c.Make + "\t\t" + c.Year);</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>42.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>43.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>// Demo descending sort of string value with IComparer.</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>44.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>Array.Sort(arrayOfCars,car.sortMakeDescending());</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>45.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>Console.WriteLine("\nArray - Sorted by Make (Descending - IComparer)\n");</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>46.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>47.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>foreach(car c in arrayOfCars)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>48.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>Console.WriteLine(c.Make + "\t\t" + c.Year);</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>49.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>50.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span> </span><span>        </span>// Demo descending sort of numeric value using IComparer.</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>51.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>Array.Sort(arrayOfCars,car.sortYearDescending());</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>52.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>Console.WriteLine("\nArray - Sorted by Year (Descending - IComparer)\n");</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>53.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>54.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>foreach(car c in arrayOfCars)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>55.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>        </span><span>    </span>Console.WriteLine(c.Make + "\t\t" + c.Year);</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>56.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>     </span></span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>57.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>Console.ReadLine();</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>58.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>59.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>   </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>60.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;">}</span></pre>
<pre style="background:white;margin-left:.5in;"><span style="color:#333333;font-family:&quot;"><span>                                                                </span></span></pre>
<p class="MsoNormal" style="text-indent:-.25in;line-height:normal;margin:0 0 10pt .5in;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>61.<span style="font:7pt &quot;">  </span></span></span><span style="font-size:9pt;color:black;font-family:&quot;">Add a class to the project. Name the class <strong>car</strong>. </span></p>
<p class="MsoNormal" style="text-indent:-.25in;line-height:normal;margin:0 0 10pt .5in;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>62.<span style="font:7pt &quot;">  </span></span></span><span style="font-size:9pt;color:black;font-family:&quot;">Replace the code in Car.cs with the following: </span></p>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>63.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;">using System;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>64.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;">using System.Collections;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>65.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;">namespace ConsoleEnum</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>66.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;">{<span>   </span></span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>67.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>   </span>public class car : IComparable</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>68.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>   </span>{<span>      </span></span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>69.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>// Beginning of nested classes.</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>70.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>71.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>// Nested class to do ascending sort on year property.</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>72.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>private class sortYearAscendingHelper: IComparer</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>73.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>{</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>74.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>int IComparer.Compare(object a, object b)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>75.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>{</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>76.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>car c1=(car)a;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>77.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>car c2=(car)b;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>78.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>79.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>if (c1.year &gt; c2.year)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>80.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>               </span>return 1;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>81.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>82.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>if (c1.year &lt; c2.year)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>83.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>               </span>return -1;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>84.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>85.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>else</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>86.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>               </span>return 0;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>87.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>88.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>89.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>90.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>// Nested class to do descending sort on year property.</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>91.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>private class sortYearDescendingHelper: IComparer</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>92.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>{</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>93.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>int IComparer.Compare(object a, object b)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>94.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>{</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>95.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>car c1=(car)a;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>96.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>car c2=(car)b;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>97.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>98.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>  </span><span>          </span>if (c1.year &lt; c2.year)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>99.<span style="font:7pt &quot;">  </span></span></span><span style="color:#333333;font-family:&quot;"><span>               </span>return 1;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>100.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>101.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>if (c1.year &gt; c2.year)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>102.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>               </span>return -1;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>103.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>104.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>else</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>105.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>               </span>return 0;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>106.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>107.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>108.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>109.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>// Nested class to do descending sort on make property.</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>110.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>private class sortMakeDescendingHelper: IComparer</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>111.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>{</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>112.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>int IComparer.Compare(object a, object b)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>113.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>{</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>114.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>car c1=(car)a;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>115.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>            </span>car c2=(car)b;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>116.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>             </span>return String.Compare(c2.make,c1.make);</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>117.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>118.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>119.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>120.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>// End of nested classes.</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>121.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>122.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>private int year;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>123.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>private string make;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>124.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>        </span></span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>125.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>public car(string Make,int Year)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>126.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>{</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>127.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>make=Make;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>128.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>year=Year;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>129.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>130.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>131.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>public int Year</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>132.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>{</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>133.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>get<span>  </span>{return year;}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>134.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>set {year=value;}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>135.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>136.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>137.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>public string Make</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>138.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>{</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>139.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>get {return make;}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>140.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>set {make=value;}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>141.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>142.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>143.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>// Implement IComparable CompareTo to provide default sort order.</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>144.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>int IComparable.CompareTo(object obj)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>145.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>{</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>146.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>car c=(car)obj;</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>147.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>return String.Compare(this.make,c.make);</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>148.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>149.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>150.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>// Method to return IComparer object for sort helper.</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>151.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>public static IComparer sortYearAscending()</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>152.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>{<span>      </span></span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>153.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>return (IComparer) new sortYearAscendingHelper();</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>154.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>155.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>156.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span> </span><span>     </span>// Method to return IComparer object for sort helper.</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>157.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>public static IComparer sortYearDescending()</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>158.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>{<span>      </span></span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>159.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>         </span>return (IComparer) new sortYearDescendingHelper();</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>160.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>161.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>162.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>// Method to return IComparer object for sort helper.</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>163.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>   </span><span>   </span>public static IComparer sortMakeDescending()</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>164.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>{<span>      </span></span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>165.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>        </span>return (IComparer) new sortMakeDescendingHelper();</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>166.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>      </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>167.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>168.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"><span>   </span>}</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>169.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">}</span></pre>
<pre style="background:white;margin-left:.5in;"><span style="color:#333333;font-family:&quot;"><span>                                                                </span></span></pre>
<p class="MsoNormal" style="text-indent:-.25in;line-height:normal;margin:0 0 10pt .5in;"><span style="font-size:9pt;color:black;font-family:&quot;"><span>170.<span style="font:7pt &quot;">               </span></span></span><span style="font-size:9pt;color:black;font-family:&quot;">Run the project. The following output appears in the Console window: </span></p>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>171.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Array - Unsorted</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>172.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>173.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Ford<span>            </span>1992</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>174.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Fiat<span>            </span>1988</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>175.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Buick<span>           </span>1932</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>176.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Ford<span>            </span>1932</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>177.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Dodge<span>           </span>1999</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>178.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Honda<span>           </span>1977</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>179.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>180.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Array - Sorted by Make (Ascending - IComparable)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>181.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>182.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Buick<span>           </span>1932</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>183.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Dodge<span>           </span>1999</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>184.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Fiat<span>            </span>1988</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>185.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Ford<span>            </span>1932</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>186.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Ford<span>            </span>1992</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>187.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Honda<span>           </span>1977</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>188.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>189.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Array - Sorted by Year (Ascending - IComparer)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>190.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>191.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Ford<span>            </span>1932</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>192.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Buick<span>           </span>1932</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>193.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Honda<span>           </span>1977</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>194.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Fiat<span>            </span>1988</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>195.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Ford<span>            </span>1992</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>196.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Dodge<span>           </span>1999</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>197.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>198.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Array - Sorted by Make (Descending - IComparer)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>199.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>200.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Honda<span>           </span>1977</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>201.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Ford<span>            </span>1932</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>202.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Ford<span>            </span>1992</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>203.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Fiat<span>            </span>1988</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>204.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Dodge<span>           </span>1999</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>205.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Buick<span>           </span>1932</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>206.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>207.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Array - Sorted by Year (Descending - IComparer)</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>208.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;"> </span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>209.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Dodge<span>           </span>1999</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>210.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Ford<span>            </span>1992</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>211.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Fiat<span>            </span>1988</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>212.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Honda<span>           </span>1977</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>213.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Buick<span>           </span>1932</span></pre>
<pre style="background:white;margin-left:.5in;text-indent:-.25in;"><span style="color:#333333;font-family:&quot;"><span>214.<span style="font:7pt &quot;">   </span></span></span><span style="color:#333333;font-family:&quot;">Ford<span>            </span>1932</span></pre>
<pre style="background:white;margin-left:.5in;"><span style="color:#333333;font-family:&quot;"><span>                                                 </span></span></pre>
<div style="border-right:medium none;border-top:windowtext 1pt solid;border-left:medium none;border-bottom:medium none;padding:1pt 0 0;">
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="font-size:9pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;padding:0;"><span style="display:none;font-size:8pt;font-family:&quot;">Bottom of Form</span></p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abbus.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abbus.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abbus.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abbus.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abbus.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abbus.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abbus.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abbus.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abbus.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abbus.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abbus.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abbus.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abbus.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abbus.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=13&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abbus.wordpress.com/2009/04/14/collection-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d67290a099ec0e26dca3f55dcd4b120?s=96&#38;d=identicon" medium="image">
			<media:title type="html">abbus</media:title>
		</media:content>
	</item>
		<item>
		<title>Button Attributes</title>
		<link>http://abbus.wordpress.com/2008/05/26/button-attributes/</link>
		<comments>http://abbus.wordpress.com/2008/05/26/button-attributes/#comments</comments>
		<pubDate>Mon, 26 May 2008 12:19:23 +0000</pubDate>
		<dc:creator>abbus</dc:creator>
				<category><![CDATA[c# files]]></category>

		<guid isPermaLink="false">http://abbus.wordpress.com/?p=12</guid>
		<description><![CDATA[this.btnadd.Attributes.Add(&#8220;onclick&#8221;, &#8220;javascript:return openAddWindow()&#8221;); Adding a attribute to a button and when buttonclick event occur it call javascript &#8220;OPENADDWINDOW&#8221; to open New window. function openAddWindow() { var client  = window.document.getElementById(&#8220;ctl00_cntTwo_ddlClients&#8221;); var clientid = client.options[client.selectedIndex].value; var Circle = window.document.getElementById(&#8220;ctl00_cntTwo_ddlCircles&#8221;); var circleid = Circle.options[Circle.selectedIndex].value; var Hub = window.document.getElementById(&#8220;ctl00_cntTwo_ddlHubs&#8221;); var Hubid = Hub.options[Hub.selectedIndex].value; var Query =&#8217;clientid=&#8217;+ clientid; Query = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=12&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>this.btnadd.Attributes.Add(&#8220;onclick&#8221;, &#8220;javascript:return openAddWindow()&#8221;);</p>
<p>Adding a attribute to a button and when buttonclick event occur it call javascript &#8220;OPENADDWINDOW&#8221; to open New window.</p>
<p>function openAddWindow()<br />
{<br />
var client  = window.document.getElementById(&#8220;ctl00_cntTwo_ddlClients&#8221;);<br />
var clientid = client.options[client.selectedIndex].value;</p>
<p>var Circle = window.document.getElementById(&#8220;ctl00_cntTwo_ddlCircles&#8221;);<br />
var circleid = Circle.options[Circle.selectedIndex].value;</p>
<p>var Hub = window.document.getElementById(&#8220;ctl00_cntTwo_ddlHubs&#8221;);<br />
var Hubid = Hub.options[Hub.selectedIndex].value;</p>
<p>var Query =&#8217;clientid=&#8217;+ clientid;<br />
Query = Query +&#8217;&amp;projid=&#8217;+circleid;<br />
Query = Query +&#8217;&amp;hubid=&#8217;+Hubid;</p>
<p>var link=&#8217;../Sites/SiteDetailsMain.aspx?status=Add&amp;&#8217;+Query;<br />
window.open(link,&#8221;SiteAdd&#8221;);//&#8217;height=550,width=780,status=yes,addressbar=yes&#8217;<br />
return false;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/abbus.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/abbus.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abbus.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abbus.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abbus.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abbus.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abbus.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abbus.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abbus.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abbus.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abbus.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abbus.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abbus.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abbus.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abbus.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abbus.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=12&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abbus.wordpress.com/2008/05/26/button-attributes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d67290a099ec0e26dca3f55dcd4b120?s=96&#38;d=identicon" medium="image">
			<media:title type="html">abbus</media:title>
		</media:content>
	</item>
		<item>
		<title>adding images to datalist</title>
		<link>http://abbus.wordpress.com/2008/05/05/adding-images-to-datalist/</link>
		<comments>http://abbus.wordpress.com/2008/05/05/adding-images-to-datalist/#comments</comments>
		<pubDate>Mon, 05 May 2008 11:25:35 +0000</pubDate>
		<dc:creator>abbus</dc:creator>
				<category><![CDATA[Asp files]]></category>

		<guid isPermaLink="false">http://abbus.wordpress.com/?p=10</guid>
		<description><![CDATA[online.aspx:- &#60;asp:DataList ID=&#8221;DataList1&#8243; runat=&#8221;server&#8221; RepeatColumns=&#8221;5&#8243; RepeatDirection=&#8221;Horizontal&#8221; Height=&#8221;165px&#8221; Width=&#8221;587px&#8221; OnItemDataBound=&#8221;DataList1_ItemDataBound&#8221; &#62; &#60;ItemTemplate&#62; &#60;table&#62; &#60;tr&#62; &#60;td &#62; &#60;asp:Image ID=&#8221;img&#8221; runat=&#8221;server&#8221; Width=100 Height=100  /&#62;&#60;br /&#62; &#60;asp:LinkButton runat =&#8221;server&#8221; ID =&#8221;lnk&#8221; Text = &#8220;dfgdfgdfgd&#8221; Width =&#8221;10px&#8221;&#62;&#60;/asp:LinkButton&#62; &#60;/td&#62; &#60;/tr&#62; &#60;/table&#62; &#60;/ItemTemplate&#62; &#60;/asp:DataList online.cs protected void Page_Load(object sender, EventArgs e) { con.Open(); SqlDataAdapter da = new SqlDataAdapter(&#8220;select * from img&#8221;, con); [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=10&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>online.aspx:-</p>
<p>&lt;asp:DataList ID=&#8221;DataList1&#8243; runat=&#8221;server&#8221; RepeatColumns=&#8221;5&#8243; RepeatDirection=&#8221;Horizontal&#8221;<br />
Height=&#8221;165px&#8221; Width=&#8221;587px&#8221; OnItemDataBound=&#8221;DataList1_ItemDataBound&#8221; &gt;<br />
&lt;ItemTemplate&gt;<br />
&lt;table&gt;<br />
&lt;tr&gt;<br />
&lt;td &gt;<br />
&lt;asp:Image ID=&#8221;img&#8221; runat=&#8221;server&#8221; Width=100 Height=100  /&gt;&lt;br /&gt;<br />
&lt;asp:LinkButton runat =&#8221;server&#8221; ID =&#8221;lnk&#8221; Text = &#8220;dfgdfgdfgd&#8221; Width =&#8221;10px&#8221;&gt;&lt;/asp:LinkButton&gt;<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/ItemTemplate&gt;<br />
&lt;/asp:DataList</p>
<p>online.cs</p>
<p>protected void Page_Load(object sender, EventArgs e)<br />
{<br />
con.Open();<br />
SqlDataAdapter da = new SqlDataAdapter(&#8220;select * from img&#8221;, con);<br />
DataSet ds = new DataSet();<br />
da.Fill(ds);<br />
DataList1.DataSource = ds.Tables[0];<br />
DataList1.DataBind();</p>
<p>}</p>
<p>protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)<br />
{<br />
DataRowView drv = (DataRowView)e.Item.DataItem;<br />
((Image)(e.Item.FindControl(&#8220;img&#8221;))).ImageUrl = drv.Row.ItemArray[1].ToString();<br />
}</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/abbus.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/abbus.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abbus.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abbus.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abbus.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abbus.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abbus.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abbus.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abbus.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abbus.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abbus.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abbus.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abbus.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abbus.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abbus.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abbus.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=10&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abbus.wordpress.com/2008/05/05/adding-images-to-datalist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d67290a099ec0e26dca3f55dcd4b120?s=96&#38;d=identicon" medium="image">
			<media:title type="html">abbus</media:title>
		</media:content>
	</item>
		<item>
		<title>imp url&#8217;s</title>
		<link>http://abbus.wordpress.com/2008/05/05/imp-urls/</link>
		<comments>http://abbus.wordpress.com/2008/05/05/imp-urls/#comments</comments>
		<pubDate>Mon, 05 May 2008 08:35:51 +0000</pubDate>
		<dc:creator>abbus</dc:creator>
				<category><![CDATA[imp urls]]></category>
		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://abbus.wordpress.com/?p=9</guid>
		<description><![CDATA[· Deployment Vs Setup: http://www.15seconds.com/issue/030806.htm · .net CHARTING enables your web site to display massive amounts of dynamically generated data quickly and easily through a visual interface: http://www.dotnetcharting.com/?15sd · Creating Crystal Reports in c#.net: http://www.codeproject.com/useritems/CreatingCrystalReports.asp · XML Files: http://www.codersource.net/csharp_xml_file_operations.html http://www.eastasp.com/en-us/ebook/list.aspx?tagIndex=2&#38;cat=ebook:devlanguage · .NET Concepts 1. http://www.geekpedia.com/language5_Csharp.html 2. http://www.codersource.net/codersource_dot_net.html · Menus in c#.net § http://search.msdn.microsoft.com/search/default.aspx?__VIEWSTATE=&#38;query=creating+menus+using+c%23.net&#38;siteid=0&#38;tab=0 § http://www.somacon.com/p142.php [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=9&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><!--[if !supportLists]--><span style="font-family:Symbol;color:red;"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><strong><span style="color:red;">Deployment Vs Setup:</span></strong></p>
<p class="MsoNormal"><strong><span style="color:red;"></span></strong><span style="color:blue;"><a href="http://www.15seconds.com/issue/030806.htm">http://www.15seconds.com/issue/030806.htm</a></span></p>
<p class="MsoNormal"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:63pt;text-indent:-0.25in;"><!--[if !supportLists]--><span style="font-size:10pt;font-family:Symbol;color:red;"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><strong><span style="font-size:10pt;font-family:&quot;color:red;">.net CHARTING enables your web site to display massive amounts of dynamically generated data quickly and easily through a visual interface:</span></strong></p>
<p class="MsoNormal"><strong><span style="font-size:10pt;font-family:&quot;color:red;"> </span></strong></p>
<p class="MsoNormal"><strong><span style="color:red;"><span> </span></span></strong><span style="color:blue;"><a href="http://www.dotnetcharting.com/?15sd">http://www.dotnetcharting.com/?15sd</a></span></p>
<p class="MsoNormal"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:63pt;text-indent:-0.25in;"><!--[if !supportLists]--><span style="font-family:Symbol;color:red;"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><strong><span style="color:red;">Creating Crystal Reports in c#.net</span><span style="color:blue;">:</span></strong></p>
<p class="MsoNormal" style="margin-left:45pt;"><span style="color:blue;"> </span></p>
<p class="MsoNormal"><span style="color:blue;"><span> </span>http://www.codeproject.com/useritems/CreatingCrystalReports.asp</span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:1in;text-indent:-0.25in;"><!--[if !supportLists]--><span style="font-family:Symbol;color:red;"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><strong><span style="color:red;">XML Files:</span></strong></p>
<p class="MsoNormal"><strong><span style="color:red;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:0.5in;text-indent:0.5in;"><span style="color:blue;"><a href="http://www.codersource.net/csharp_xml_file_operations.html">http://www.codersource.net/csharp_xml_file_operations.html</a></span></p>
<p class="MsoNormal" style="margin-left:0.5in;text-indent:0.5in;"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:0.5in;line-height:14.4pt;"><span style="font-size:10pt;font-family:&quot;color:black;"><a href="http://www.eastasp.com/en-us/ebook/list.aspx?tagIndex=2&amp;cat=ebook:devlanguage" target="_blank">http://www.eastasp.com/en-us/ebook/list.aspx?tagIndex=2&amp;cat=ebook:devlanguage</a></span></p>
<p class="MsoNormal" style="margin-left:0.5in;text-indent:0.5in;"><span style="color:red;"> </span></p>
<p class="MsoNormal" style="margin-left:1in;text-indent:-0.25in;"><!--[if !supportLists]--><span style="font-family:Symbol;color:red;"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><strong><span style="color:red;">.NET Concepts</span></strong></p>
<p class="MsoNormal" style="margin-left:1in;text-indent:0.5in;"><span style="color:blue;">1. <a href="http://www.geekpedia.com/language5_Csharp.html">http://www.geekpedia.com/language5_Csharp.html</a></span></p>
<p class="MsoNormal" style="margin-left:1.5in;"><span style="color:blue;">2. <a href="http://www.codersource.net/codersource_dot_net.html">http://www.codersource.net/codersource_dot_net.html</a></span></p>
<p class="MsoNormal"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:1.5in;"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:1in;text-indent:-0.25in;"><!--[if !supportLists]--><span style="font-family:Symbol;color:red;"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><strong><span style="color:red;">Menus in c#.net</span></strong></p>
<p class="MsoNormal" style="margin-left:2in;text-indent:-0.25in;"><!--[if !supportLists]--><span style="font-family:Wingdings;color:blue;"><span>§<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><span style="color:blue;"><a href="http://search.msdn.microsoft.com/search/default.aspx?__VIEWSTATE=&amp;query=creating+menus+using+c%23.net&amp;siteid=0&amp;tab=0">http://search.msdn.microsoft.com/search/default.aspx?__VIEWSTATE=&amp;query=creating+menus+using+c%23.net&amp;siteid=0&amp;tab=0</a></span></p>
<p class="MsoNormal" style="margin-left:1.5in;"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:2in;text-indent:-0.25in;"><!--[if !supportLists]--><span style="font-family:Wingdings;color:blue;"><span>§<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><span style="color:blue;"><a href="http://www.somacon.com/p142.php">http://www.somacon.com/p142.php</a> (CSS Color Chart)</span></p>
<p class="MsoNormal" style="margin-left:1.5in;"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:1.5in;"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:1in;text-indent:-0.25in;"><!--[if !supportLists]--><span style="font-family:Symbol;color:red;"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><strong><span style="color:red;">Menu Tools:</span></strong></p>
<p class="MsoNormal"><strong><span style="color:red;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.5in;"><span style="color:blue;"><a href="http://www.thefreecountry.com/programming/helpauthoring.shtml">http://www.thefreecountry.com/programming/helpauthoring.shtml</a></span></p>
<p class="MsoNormal" style="margin-left:1.5in;"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:1in;text-indent:-0.25in;"><!--[if !supportLists]--><span style="font-family:Symbol;color:red;"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><strong><span style="color:red;">Help Files:</span></strong></p>
<p class="MsoNormal" style="margin-left:1.5in;"><span style="color:blue;"><a href="http://www.danish-shareware.dk/soft/shelpm/">http://www.danish-shareware.dk/soft/shelpm/</a></span></p>
<p class="MsoNormal" style="margin-left:1.5in;"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:1in;text-indent:-0.25in;"><!--[if !supportLists]--><span style="font-family:Symbol;color:red;"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><strong><span style="color:red;">HTML:</span></strong></p>
<p class="MsoNormal"><strong><span style="color:red;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.5in;"><span style="color:blue;"><a href="http://www.obscure.org/~jaws/htmlhelp.html">http://www.obscure.org/~jaws/htmlhelp.html</a></span></p>
<p class="MsoNormal" style="margin-left:1.5in;"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:1in;text-indent:-0.25in;"><!--[if !supportLists]--><span style="font-family:Symbol;color:red;"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><strong><span style="color:red;">Building Grid using java script:</span></strong></p>
<p class="MsoNormal" style="margin-left:0.75in;"><strong><span style="color:red;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.5in;"><span style="color:blue;"><a href="http://www.activewidgets.com/javascript.forum.4448.1/highlight-textbox-text.html">http://www.activewidgets.com/javascript.forum.4448.1/highlight-textbox-text.html</a></span></p>
<p class="MsoNormal" style="margin-left:1.5in;"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:1in;text-indent:-0.25in;"><!--[if !supportLists]--><span style="font-family:Symbol;color:red;"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><strong><span style="color:red;">Menus using javascript</span></strong></p>
<p class="MsoNormal" style="margin-left:1in;text-indent:0.25in;"><span style="color:blue;"><a href="http://dhtml-menu.com/dhtml-samples/menu615.html">http://dhtml-menu.com/dhtml-samples/menu615.html</a></span></p>
<p class="MsoNormal" style="margin-left:1in;text-indent:0.25in;"><span style="color:blue;"><a href="http://www.webcredible.co.uk/user-friendly-resources/css/css-round-corners.shtml">http://www.webcredible.co.uk/user-friendly-resources/css/css-round-corners.shtml</a></span></p>
<p class="MsoNormal"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:1in;text-indent:-0.25in;"><!--[if !supportLists]--><span style="font-family:Symbol;color:red;"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><strong><span style="color:red;">Read and Write Files using Javascript:</span></strong></p>
<pre><span style="color:#404040;"><span>                                                     </span><span>                         </span><span>      </span><span>        </span><a href="http://www.webreference.com/js/column71/index.html">http://www.webreference.com/js/column71/index.html</a></span>
<span style="color:#404040;"><span>               </span><a href="http://www.webreference.com/js/column55/index.html">http://www.webreference.com/js/column55/index.html</a></span>
<span style="color:#404040;"> </span></pre>
<p class="MsoNormal" style="margin-left:1in;text-indent:-0.25in;"><!--[if !supportLists]--><span style="font-family:Symbol;color:red;"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><strong><span style="color:red;">Menu Images:</span></strong></p>
<p class="MsoNormal" style="margin-left:120pt;text-indent:-0.25in;"><!--[if !supportLists]--><span style="color:blue;"><span>1.<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><span style="color:blue;"><span> </span><span> </span><a href="http://www.cssplay.co.uk/menus/index.html">http://www.cssplay.co.uk/menus/index.html</a></span></p>
<p class="MsoNormal" style="margin-left:120pt;text-indent:-0.25in;"><!--[if !supportLists]--><span style="color:blue;"><span>2.<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><span style="color:blue;"><span> </span><span> </span><a href="http://www.fg-a.com/backgrounds.htm">http://www.fg-a.com/backgrounds.htm</a></span></p>
<p class="MsoNormal" style="margin-left:120pt;text-indent:-0.25in;"><!--[if !supportLists]--><span style="color:blue;"><span>3.<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><span style="color:blue;">http://www.grsites.com/textures/</span></p>
<p class="MsoNormal"><span style="color:blue;"> </span></p>
<p class="MsoNormal"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:156pt;text-indent:-102pt;"><!--[if !supportLists]--><span style="font-family:Symbol;color:red;"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><strong><span style="color:red;"><a href="https://cart.coffeecup.com/cart/">https://cart.coffeecup.com/cart/</a></span></strong></p>
<p class="MsoNormal" style="margin-left:0.75in;"><strong><span style="color:red;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:156pt;text-indent:-102pt;"><!--[if !supportLists]--><span style="font-family:Symbol;color:red;"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-family:&quot;"> </span></span></span><!--[endif]--><strong><span style="color:red;">Session Information:</span></strong></p>
<p class="MsoNormal" style="margin-left:1.5in;"><span style="color:blue;"><a href="http://support.microsoft.com/kb/307598/">http://support.microsoft.com/kb/307598/</a></span></p>
<p class="MsoNormal"><span style="color:blue;"> </span></p>
<ul style="margin-top:0;" type="disc">
<li class="MsoNormal"><strong>Data Set:</strong></li>
</ul>
<p class="MsoNormal"><span style="color:blue;"> </span></p>
<p class="MsoNormal"><span style="color:blue;"> </span></p>
<ul style="margin-top:0;" type="disc">
<li>
<ol style="margin-top:0;" type="1">
<li class="MsoNormal">http://www.c-sharpcorner.com/Article/frmDisplayArticles.aspx?SectionID=1&amp;SubSectionID=131</li>
</ol>
</li>
</ul>
<p class="MsoNormal"><strong><span style="color:red;"> </span></strong></p>
<ul style="margin-top:0;" type="disc">
<li class="MsoNormal"><strong>Convert datagrid content to PDF:</strong></li>
</ul>
<p class="MsoNormal" style="margin-left:0.25in;"><strong><span style="color:red;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:0.25in;"><span style="color:blue;"><span> </span>http://www.scripts20.com/category/ASP_NET/Documents/1/0.html</span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="color:red;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="color:red;"> </span></strong></p>
<ul style="margin-top:0;" type="disc">
<li class="MsoNormal"><strong>Tree View:</strong></li>
</ul>
<p class="MsoNormal"><strong><span style="color:red;"> </span></strong></p>
<p class="MsoNormal"><span style="color:#3366ff;"><a href="http://www.kiranreddys.com/csharp_faqs/02297266.html">http://www.kiranreddys.com/csharp_faqs/02297266.html</a></span></p>
<p class="MsoNormal"><span style="color:#3366ff;"> </span></p>
<ul style="margin-top:0;" type="disc">
<li class="MsoNormal"><strong>PL/SQL Programming:</strong></li>
</ul>
<p class="MsoNormal" style="margin-left:0.25in;"><span style="color:#3366ff;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="color:red;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="color:blue;"><a href="http://www-db.stanford.edu/~ullman/fcdb/oracle/or-plsql.html#basic%20structure%20of%20pl/sql">http://www-db.stanford.edu/~ullman/fcdb/oracle/or-plsql.html#basic%20structure%20of%20pl/sql</a></span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="color:blue;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="color:red;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:9pt;font-family:&quot;color:black;"> </span></p>
<ul style="margin-top:0;" type="disc">
<li class="MsoNormal"><strong><span style="font-family:&quot;">Sql      Server:</span></strong></li>
</ul>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:10pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span class="labelhead1"><span style="font-size:10pt;"> </span></span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span class="labelhead1"><span style="font-size:10pt;color:blue;"><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da_5b1v.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da_5b1v.asp</a></span></span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span class="labelhead1"><span style="font-size:10pt;color:blue;"> </span></span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:10pt;font-family:&quot;color:black;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:10pt;font-family:&quot;color:black;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:10pt;font-family:&quot;color:black;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:10pt;font-family:&quot;color:black;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span class="headfont1"><span style="font-size:13.5pt;color:#374e8c;"> </span></span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span class="headfont1"><span style="font-size:13.5pt;color:#374e8c;"> </span></span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span class="headfont1"><span style="font-size:13.5pt;color:#374e8c;"> </span></span></p>
<p class="MsoNormal" style="margin-left:1.25in;">
<p class="MsoNormal" style="margin-left:1.25in;"><span class="headfont1"><span style="font-size:13.5pt;color:#374e8c;"> </span></span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span class="headfont1"><span style="font-size:13.5pt;color:#374e8c;"> </span></span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span class="headfont1"><span style="font-size:13.5pt;color:#374e8c;"> </span></span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span class="headfont1"><span style="font-size:13.5pt;color:#374e8c;"> </span></span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span class="headfont1"><span style="font-size:13.5pt;color:#374e8c;"> </span></span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span class="headfont1"><span style="font-size:13.5pt;color:#374e8c;"> </span></span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:10pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span class="headfont1"><span style="font-size:13.5pt;color:#374e8c;"> </span></span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:10pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span class="headfont1"><span style="font-size:13.5pt;color:#374e8c;"> </span></span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:10pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:10pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:10pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:10pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="text-decoration:underline;"><span style="font-size:9pt;font-family:&quot;color:red;"><span style="text-decoration:none;"> </span></span></span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:10pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:9pt;font-family:&quot;color:black;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:9pt;font-family:&quot;color:black;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:11pt;font-family:&quot;color:black;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:11pt;font-family:&quot;color:black;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:11pt;font-family:&quot;color:black;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:11pt;font-family:&quot;color:black;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:11pt;font-family:&quot;color:black;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:11pt;font-family:&quot;color:black;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:9pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:9pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:9pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:9pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:9pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:9pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:9pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:9pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:9pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:9pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="font-size:9pt;font-family:&quot;color:black;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:9pt;font-family:&quot;color:black;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:9pt;font-family:&quot;color:black;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><span style="font-size:9pt;font-family:&quot;color:black;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="color:red;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="color:red;"> </span></strong></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="color:red;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="color:red;"> </span></strong></p>
<p class="MsoNormal" style="margin-left:1.25in;"><strong><span style="color:red;"> </span></strong></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/abbus.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/abbus.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abbus.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abbus.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abbus.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abbus.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abbus.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abbus.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abbus.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abbus.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abbus.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abbus.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abbus.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abbus.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abbus.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abbus.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=9&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abbus.wordpress.com/2008/05/05/imp-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d67290a099ec0e26dca3f55dcd4b120?s=96&#38;d=identicon" medium="image">
			<media:title type="html">abbus</media:title>
		</media:content>
	</item>
		<item>
		<title>3_teir architecture</title>
		<link>http://abbus.wordpress.com/2008/04/15/3_teir-architecture/</link>
		<comments>http://abbus.wordpress.com/2008/04/15/3_teir-architecture/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 05:44:51 +0000</pubDate>
		<dc:creator>abbus</dc:creator>
				<category><![CDATA[c# files]]></category>

		<guid isPermaLink="false">http://abbus.wordpress.com/?p=8</guid>
		<description><![CDATA[Contents 1. 3.Tier Architecture 1.0     Definition and Motivation.02 1.1        Data Tier,,,04 1.2          Logical Tier ..04 1.2.1     Business Tier.05 1.2.2     Data Access Tier&#8230;&#8230;..05 1.3          Presentation Tier&#8230;.05 2. Creating  a  3.Tier  ASP.NET  application 2.1         Installing the web application TimeManagement..05 2.2         Implementing of Data Tier&#8230;.07 2.2.1     Table Person&#8230;07 2.2.2     Table ProjectI.08 2.2.3      Table ProjectInvolvement.08 2.3         Implementing Logical Tier&#8230;.10 2.3.1         [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=8&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong><span style="font-size:small;">Contents</span></p>
<p></strong></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>1. 3.Tier  Architecture</p>
<p></strong></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">1.0     Definition and  Motivation.02<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">1.1        Data  Tier,,,04<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">1.2          Logical Tier  ..04<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"> 1.2.1      Business Tier.05<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"> 1.2.2     Data Access  Tier&#8230;&#8230;..05<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">1.3          Presentation  Tier&#8230;.05</p>
<p></span><strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small;"><span style="font-size:x-small;">2. Creating  a   3.Tier  ASP.NET  application<br />
</span><br />
</span></strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">2.1         Installing the web  application TimeManagement..05<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">2.2         Implementing of Data  Tier&#8230;.07<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"> 2.2.1     Table Person&#8230;07<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">2.2.2     Table ProjectI.08<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">2.2.3      Table  ProjectInvolvement.08<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">2.3         Implementing Logical  Tier&#8230;.10<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">2.3.1         Implementing Data  Access Tier.10<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">2.3.2         Implementing   Business Tier&#8230;&#8230;.. 18<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">2.4         Implementing  Presentation Tier&#8230;..20<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">2.5          Conclusion..23<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">2.6          Reference&#8230;23</p>
<p></span><strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small;">1. 3-Tier Architecture</p>
<p></span></strong><strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">1.0  Definition and  motivation</p>
<p></span></strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">A 3-tier application is a program  which is organized into three major disjunctive </span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">tiers. These tiers are</span></span></p>
<ul><span></p>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Presentation Tier  (Front  end) </span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Logical Tier   (Middleware) </span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Data Tier (Backend). </span></li>
<p></span></ul>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Each layer can be deployed  in geographically separated computers in a network. Some architects divide Logic  Tier in to two sub tiers  Business  and Data Access Tiers,  in order to   increase scalability and transparency. The tiers can be deployed on physically  separated machines. The characteristic of the tier communication is that the  tiers will communicate only to their adjacent neighbors. For an example, The  Presentation Tier will interact directly with the Business Tier and not directly  with Data Access or Data Tiers. </span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"> <img src="Images/Build3tierApp4.jpg" border="0" alt="" hspace="0" align="bottom" /> </span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>Fig 1  (A typical  3.Tier Architecture)</strong></span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">The Figure 1 shows a  typical 3.Tier Architecture scenario. I think, we should look back the history  of computing to understand the advantages of 3.Tier  Architecture.</p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Mainframes ruled the it-landscape  until mid 1980s .The main characteristic of a Host Architecture is that the  application and databases reside on the same host computer and  the user  interact with the host  using an unfriendly and dump terminal. This monolith  architecture does not support distributed computing (the host applications are  not able to connect a database of a strategically allied partner). Some mangers  found that developing a host application take too long and expensive.  Consequently led  these disadvantages  to Client-Server(C/S) architecture.</p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">In fact,  Client Server(C/S) architecture is a 2-Tier architecture because the client does  not distinguish between Presentation Tier and Logical Tier.  That is why we call  this type of client as Fat Client. The increasing demands on GUI controls caused  difficulty to manage the mixture of source code from GUI and Business Logic  (Spaghetti Code). Further, C\S Architecture does not support enough the Change  Management. Let us suppose that the government increases the consume tax rate  from 14% to 16 %, then in the C\S case, you have to send an update to each  clients and they must update synchronously on a specific time otherwise you may  store corrupt information. The C/S Architecture is also a burden to network  traffic and resources. Let us assume that about five hundred clients are working  on a data server then we will have five hundred ODBC connections and several   ruffian record sets, which must be transported from the server to the clients  (because the Business Logic Tier is situated in the client side). The fact that  C/S does not have any caching facilities like in ASP.NET, caused additional  traffic in the network. In the late 1990s, designers have shifted the Business  Logic from the client to server to elude the handicaps from C/S Architecture.  Normally, a server  has a better hardware than client therefore it is able  compute algorithms faster than a client, so this fact is also an additional pro  argument for the 3.Tier Architecture.</p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Now let us go back to our 3.Tier  Architecture and start to explore the tiers.</p>
<p></span><strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">1.1  Data  Tier</p>
<p></span></strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">This Tier is responsible for  retrieving, storing and updating from Information therefore this tier can be  ideally represented through a commercial database. We consider stored procedures  as a part of te Data Tier. Usage of stored procedures increases the performance  and code transparency of an application</p>
<p></span><strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">1.2  Logical  Tier</p>
<p></span></strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">This is the brain of the 3.Tier  Application. Some architects do not make any distinction between Business Tier  and Data Access Tier. Their main argumentation is that additional tiers will  screw down performance. I think that we will have more advantages, if we  separate Logical Tier in to Business Tier and Data Access Tier. Some of these  advantages are</span></span></p>
<ul><span></p>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Increases code  transparency</span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Supports changes in Data  Layer. You can change or alter database with out touching the Business Layer and  this would be a very minimum touch up. </span></li>
<p></span></ul>
<p><span><strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">1.2.1  Business  Tier</p>
<p></span></strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">This sub tier contents classes to  calculate aggregated values such like total revenue, cash flow and ebit and this  tier doesnt know about any GUI controls and how to access databases. The classes  of Data Access Tier will supply the needy information from the databases to this  sub tier.</p>
<p></span><strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">1.2.2  Data Access  Tier:</p>
<p></span></strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">This tier acts as an interface to  Data Tier. This tier knows, how to (from which database) retrieve and store  information.</p>
<p></span><strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">1.3  Presentation  Tier:</p>
<p></span></strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">This Tier is responsible for  communication with the users and web service consumers and it will use objects  from Business Layer to response GUI raised events.</p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">After this brief theory, I think we  should move now to the practical part. Our aim is to develop a work diary for  employees, in which they can record daily project  activities.</p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small;"><strong>2. Creating a  3.Tier  ASP.NET  application.</p>
<p></strong></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">You  need a SqlServer, IIS and Microsoft.NET CLR to run the example application.  Please follow the steps to run the ASP.NET application.</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"></p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>2.1  Installing the web  application Timemanagement</strong></p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">You should follow these steps to  install the web application TimeManagement on your machine.</span></span></p>
<ol><span></p>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Create a new Sql Server  database with the name TimeManagement and execute the file TimeManagement.sql  (included the Zip file) by using the tool SQL Query Analyzer to create the   needed tables and store procedures for this application.
<p></span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Create an ASP.Net  Appliaction  TimeManagement  and replace it with the file TimeManagement which  you find in the .zip file
<p></span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Adjust the  XML Element  &lt;appsettings&gt;  in the Web.config file to establish SQL connection.(modify  the value from Sqlconnection)
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">appSettings</span><span style="color:#0000ff;">&gt;<br />
&lt;</span><span style="color:#800000;">addkey</span><span style="color:#0000ff;">=&#8221;SqlConnect&#8221;</span><span style="color:#ff00ff;"> </span><span style="color:#ff0000;">value</span><span style="color:#0000ff;">=&#8221;server=F5;database=TimeManagement;uid=sa;pwd=moses;&#8221;</span><span style="color:#ff00ff;"> </span><span style="color:#0000ff;">/&gt;<br />
&lt;/</span><span style="color:#800000;">appSettings</span><span style="color:#0000ff;">&gt;</p>
<p></span></span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Set the Page LogIn.aspx    as the start page. </span></li>
<p></span></ol>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">I hope now that you can  run the web application</p>
<p></span><strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">2.2  Implementing of Data  Tier</p>
<p></span></strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">This tier is represented by the  Sqlserver database TimeManagement and it has 3 tables. The Fig 2 shows the ERD  diagram of  the database TimeManagement. Now, I like describe the tables  briefly. </span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><img src="Images/Build3tierApp5.jpg" border="0" alt="" hspace="0" align="bottom" /></span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>Fig  2</strong></span></span></p>
<p><span><strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">2.2.1  Table  Person</p>
<p></span></strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">This table stores information about  employees. The attribute PersID is the primary key of this table and the  database will increment this value automatically during insertion of a new data  row. The values of the attribute Email  correspond bijectively  to the values of  the attribute PersID.  In order to obtain this relationship, application must  keep the values of attribute Email unique. We have implemented this rule in the   stored procedure InsertPerson  (see fig 3), which is used to insert a new  record.</p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#0033ff;">CREATE PROCEDURE</span> InsertPerson<br />
(<br />
@Name  <span style="color:#0033cc;">char</span>(50),<br />
@CName <span style="color:#0033cc;">char</span>(50),<br />
@WeekHour <span style="color:#0033ff;">int</span>,<br />
@Password<br />
<span style="color:#0033ff;">char</span>(50),<br />
@EMail  <span style="color:#0033ff;">char</span>(50),<br />
@AlreadyIn<span style="color:#0033ff;"> int out</span><br />
)<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#0033ff;">AS<br />
SELECT</span> @AlreadyIn=<span style="color:#cc33cc;">COUNT</span>(*)  <span style="color:#0033ff;">FROM </span>Person <span style="color:#0033cc;">WHERE</span> </span><a href="mailto:EMail=@EMail"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">EMail=@EMail</span></a><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"> </span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#0033cc;">IF</span> @AlreadyIn=0<br />
<span style="color:#0033ff;">INSERT INTO</span> Person<br />
(<span style="color:#0033cc;">Name</span> ,CName ,WeekHour ,<span style="color:#0033ff;">Password</span> ,EMail )<br />
<span style="color:#0033ff;">VALUES</span><br />
(@Name ,@CName ,@WeekHour ,@Password ,@EMail   )<br />
GO </span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>Fig  3</strong></span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>2.2.2  Table  Project</p>
<p></strong></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">This table stores information about  projects of a firm. The attribute ProjID  is the  key of  this table and it will  be automatically incremented by the database during the insertion  a new row.  The attribute Leader is a foreign key of the table Person. </span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>2.2.3  Table   ProjectInvolvement</p>
<p></strong></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">This table contents information to  answer questions such like: how many hours has spent  employee X  in the   project P  on a specific day?. The key attributes of this table are EntryDate  ,ProjID and  PersID. The attribute ProjID is a foreign key of the Table Project  and the attribute is PersID  is a foreign key of the table Person. </span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"> <img src="Images/Build3tierApp6.gif" border="0" alt="" hspace="0" align="bottom" /></span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>Fig 4 ( partial  class diagram of the application TimeManagement)</strong></span></span></p>
<p><span><strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small;"><span style="font-size:x-small;">2.3 Implementing Logical Tier</span></p>
<p></span></strong><strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">2.3.1 Implementing Data Access  Tier</p>
<p></span></strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">All classes of Data Access Tier are  derived from the super class DABasis(See Fig 4), which  is responsible for  establishing database connection.</p>
<p></span><span style="color:#0000ff;font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">&lt;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#800000;font-size:x-small;">appSettings</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#0000ff;font-size:x-small;">&gt;<br />
</span><span style="color:#0000ff;font-size:x-small;">&lt;</span><span style="color:#800000;font-size:x-small;">addkey</span><span style="color:#0000ff;font-size:x-small;">=&#8221;SqlConnect&#8221;</span><span style="color:#ff00ff;font-size:x-small;"> </span><span style="color:#ff0000;font-size:x-small;">value</span><span style="color:#0000ff;font-size:x-small;">=&#8221;server=F5;database=TimeManagement;uid=sa;pwd=moses;&#8221;</span><span style="color:#ff00ff;font-size:x-small;"> </span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#0000ff;font-size:x-small;">/&gt;<br />
&lt;/</span><span style="color:#800000;font-size:x-small;">appSettings</span><span style="color:#0000ff;font-size:x-small;">&gt;</span></span><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"></p>
<p></span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>Fig 5 (partial source code  from Web.config)<br />
</strong><br />
</span><span style="color:#808080;font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">///</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#008000;font-size:x-small;"> </span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;summary&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;"> This is the super class for Data Access  Classes<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;/summary&gt;<br />
</span><span style="color:#0000ff;font-size:x-small;">class</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> DABasis<br />
{<br />
</span><span style="color:#0000ff;font-size:x-small;">protected</span><span style="font-size:x-small;"> </span><span style="color:#0000ff;font-size:x-small;">static</span><span style="font-size:x-small;"> </span><span style="color:#0000ff;font-size:x-small;">string</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> strConnect;<br />
</span><span style="color:#0000ff;font-size:x-small;">public</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> DABasis()<br />
{<br />
}<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;summary&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;"> Please see the web.config file<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;/summary&gt;<br />
</span><span style="color:#0000ff;font-size:x-small;">static</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> DABasis()<br />
{<br />
strConnect=ConfigurationSettings.AppSettings["SqlConnect"];<br />
}<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;summary&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;"> Gets a SqlConnection to the local  sqlserver<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;/summary&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span><span style="color:#808080;font-size:x-small;">&lt;returns&gt;</span><span style="color:#008000;font-size:x-small;">SqlConnection</span><span style="color:#808080;font-size:x-small;">&lt;/returns&gt;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;"><br />
</span><span style="color:#0000ff;font-size:x-small;">protected</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> SqlConnection  GetConnection()<br />
{<br />
SqlConnection oConnection = </span><span style="color:#0000ff;font-size:x-small;">new</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> SqlConnection(strConnect);<br />
</span><span style="color:#0000ff;font-size:x-small;">return</span></span><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"> oConnection;<br />
}<br />
}</p>
<p></span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>Fig  6  (class  DABasis)</strong></span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">We have stored the global  application attributes such like string  SqlConnect  in the configuration file   Web.config and you can retrieve this value using the sealed class  ConfigurationSettings (See Fig 6: static DABasis()).</p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">We like to show you now exemplary   typical data access methods of a DataAccess class, which are used retrive a  Dataset or insert or update some data rows. In our implementation we distinguish  two  types Data Access methods and they are:</span></span></p>
<ul><span></p>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Query Data Access Method:  which are used typically to retrieve data structures like DataSet or DataTable  from tables.
<p></span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Non Query Data Access  Method:  which are used typically to update a table or insert a data row in to a  table. </span></li>
<p></span></ul>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">At first, we going to look  a Query Data Access Method.The class DAPInvolvement  wraps a bundle of data  access methods which deal with the matter project involvement. The method void  Dataset DAPInvolvement.GetDayRecord(int nPersID,DateTime dtEntry) (see Figure <img src='http://s2.wp.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' />  will return  a dataset, which contents  all project activities of a person with  the ID PersID on a particular day dtEntry This method uses the stored procedure  GetDayRecord (see Fig 7) to retrieve essential data from the tables  ProjectInvolvement and Project.</p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#0033cc;">CREATE  PROCEDURE</span> GetDayRecord<br />
(<br />
@PersID <span style="color:#0033ff;">int</span>,<br />
@EntryDate <span style="color:#0033cc;">datetime</span><br />
)<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#0033ff;">AS<br />
SELECT</span> P.<span style="color:#0033ff;">Name</span>, P.ProjID,  <span style="color:#cc33cc;">PI</span>.Duration<br />
<span style="color:#0033ff;">FROM </span>ProjectInvolvement <span style="color:#cc3399;">PI</span> , Project P<br />
<span style="color:#0000ff;">WHERE</span> <span style="color:#993399;">PI</span>.PersID= @PersID  and<span style="color:#0033ff;"> </span><span style="color:#cc0099;">PI</span>.ProjID=P.ProjID and </span><a href="mailto:PI.EntryDate=@EntryDate"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">PI.EntryDate=@EntryDate</span></a><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"></p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>Fig 7  (Store Procedure   GetDayRecord)</strong></span></span></p>
<p><span><span style="color:#808080;font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">///</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#008000;font-size:x-small;"> </span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;sumary&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;"> gives the list of activities of the (person)ID for the  particular EntryDate<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;/summary&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span><span style="color:#808080;font-size:x-small;">&lt;param  name=&#8221;nPersID&#8221;&gt;</span><span style="color:#008000;font-size:x-small;">PersID attribute of  ProjectInvolvement</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;/param&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span><span style="color:#808080;font-size:x-small;">&lt;param  name=&#8221;dtEntry&#8221;&gt;</span><span style="color:#008000;font-size:x-small;">EntryDate attribute of  ProjectInvolvement</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;/param&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span><span style="color:#808080;font-size:x-small;">&lt;returns&gt;</span><span style="color:#008000;font-size:x-small;">DataSet and the table  name is &#8220;dtDayRecord&#8221; </span><span style="color:#808080;font-size:x-small;">&lt;/returns&gt;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;"><br />
</span><span style="color:#0000ff;font-size:x-small;">public</span><span style="font-size:x-small;"> DataSet  GetDayRecord(</span><span style="color:#0000ff;font-size:x-small;">int</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;"> nPersID,DateTime  dtEntry)<br />
{<br />
SqlConnection oConnection = GetConnection();<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;">// build  the command<br />
</span><span style="font-size:x-small;">SqlCommand oCommand = </span><span style="color:#0000ff;font-size:x-small;">new</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;"> SqlCommand(&#8220;GetDayRecord&#8221;,oConnection);<br />
oCommand.CommandType=CommandType.StoredProcedure; </span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;">// Parametrs<br />
</span><span style="font-size:x-small;">SqlParameter paraPersID= </span><span style="color:#0000ff;font-size:x-small;">new</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;"> SqlParameter(&#8220;@PersID&#8221;,SqlDbType.Int,4);<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">paraPersID.Value=nPersID;<br />
oCommand.Parameters.Add(paraPersID);<br />
SqlParameter paraEntryDate=<br />
</span><span style="color:#0000ff;font-size:x-small;">new</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;"> SqlParameter(&#8220;@EntryDate&#8221;,SqlDbType.DateTime);<br />
paraEntryDate.Value=dtEntry;<br />
oCommand.Parameters.Add(paraEntryDate);<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;">// Adapter and DataSet<br />
</span><span style="font-size:x-small;">SqlDataAdapter oAdapter= </span><span style="color:#0000ff;font-size:x-small;">new</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> SqlDataAdapter();<br />
oAdapter.SelectCommand=oCommand;<br />
DataSet  oDataSet = </span><span style="color:#0000ff;font-size:x-small;">new</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;"> DataSet();<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#0000ff;font-size:x-small;">try<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">{<br />
oConnection.Open();<br />
oAdapter.Fill(oDataSet,&#8221;dtDayRecord&#8221;);</span><span style="color:#0000ff;font-size:x-small;">return</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> oDataSet;<br />
}<br />
</span><span style="color:#0000ff;font-size:x-small;">catch</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;">(Exception  oException){<br />
</span><span style="color:#0000ff;font-size:x-small;"><br />
<span style="font-family:Verdana,Arial,Helvetica,sans-serif;">throw</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> oException;<br />
}<br />
</span><span style="color:#0000ff;font-size:x-small;">finally</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"><br />
{<br />
oConnection.Close();<br />
}<br />
} </span></p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>Fig 8   (The method  DAPInvolvement.GetDayRecord)</strong></span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">A typical Query Data  Access  method might  be abstractly described like this:</span></span></p>
<ul><span></p>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Establish  SqlConnection.</span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Create a SqlCommand and  necessary SqlParameters to the command.</span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Create a DataSet and a  SqlDataAdapter.</span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Open the connection and  fill the DataSet with help of the SqlDataAdapter.</span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Close the SqlConnection. </span></li>
<p></span></ul>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Some of you may ask the  question, why we are using a DataSet instead  a SqlDataReader. Indeed , you can  retrieve data rows faster using a SqlDataReader  than a Dataset, but if you want  use WebService, you ought to use DataSet. Because it is not possible to transmit  a SqlDataReader using SOAP protocol. You can transmit via SOAP  all objects  which are belong to  the types:</span></span></p>
<ul><span></p>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">DataSet  (ADO.NET) </span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Complex Arrays </span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">XML nodes </span></li>
<p></span></ul>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Now, I want to show a  typical Non Query Data Access method. The DataAccess method:</p>
<p></span><span style="color:#0000ff;font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">public</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> </span><span style="color:#0000ff;font-size:x-small;">void</span><span style="font-size:x-small;"> DAProject.Insert(</span><span style="color:#0000ff;font-size:x-small;">string</span><span style="font-size:x-small;"> strName,</span><span style="color:#0000ff;font-size:x-small;">string</span><span style="font-size:x-small;"> strDescription,</span><span style="color:#0000ff;font-size:x-small;">int</span><span style="font-size:x-small;"> nLeader,</span><span style="color:#0000ff;font-size:x-small;">out</span><span style="font-size:x-small;"> </span><span style="color:#0000ff;font-size:x-small;">int</span><span style="font-size:x-small;"> nAlreadyIn)</span><br />
(see Figure  10) is used to insert a new project  in to the database  and it uses the stored procedure  InsertProject.</p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">(see Fig 9). The out parameter of  this method out int nAlreadyIn serves as a flag to the classes of  Business  Logic Tier, whether the record is inserted by this method or not.</p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#0000ff;">CREATE PROCEDURE</span> InsertProject<br />
(<br />
@Name  <span style="color:#0033ff;">char</span>(50),<br />
@Description <span style="color:#0033ff;">char</span>(150),<br />
@Leader <span style="color:#0033ff;">int</span>,<br />
@AlreadyIn <span style="color:#0033ff;">int  output</span><br />
)<br />
<span style="color:#0033ff;">AS</span> </span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#0033ff;">SELECT</span> @AlreadyIn = <span style="color:#cc00cc;">Count</span>(*)   From Project <span style="color:#0033ff;">WHERE</span> </span><a href="mailto:Name=@Name"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Name=@Name</span></a><br />
<span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#0033ff;">IF </span> @AlreadyIn =0<br />
<span style="color:#0033ff;">INSERT INTO</span> Project<br />
(<span style="color:#0033ff;">Name</span>,<span style="color:#0033ff;">Description</span>,Leader)<br />
<span style="color:#0033ff;">VALUES</span><br />
(@Name,@Description,@Leader)<br />
GO</p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>Fig  9   (store  procedure  InsertProject)</strong></span></span></p>
<p><span><span style="color:#808080;font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">///</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#008000;font-size:x-small;"> </span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;summary&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;"> inserts a new data row into the table  &#8220;project&#8221;<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;/summary&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;param name=&#8221;Name&#8221;&gt;&lt;/param&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span><span style="color:#808080;font-size:x-small;">&lt;param name=&#8221;Description&#8221;&gt;&lt;/param&gt;</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span><span style="color:#808080;font-size:x-small;">&lt;param name=&#8221;Leader&#8221;&gt;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#008000;font-size:x-small;">a foreign key<br />
from Person</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;/param&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span><span style="color:#808080;font-size:x-small;">&lt;param name=&#8221;AlreadyIn&#8221;&gt;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#008000;font-size:x-small;">number of  records which fulfill the term &#8220;Name=strName&#8221;<br />
efore the  Insertation</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;/param&gt;<br />
</span><span style="color:#0000ff;font-size:x-small;">public</span><span style="font-size:x-small;"> </span><span style="color:#0000ff;font-size:x-small;">void</span><span style="font-size:x-small;"> Insert(</span><span style="color:#0000ff;font-size:x-small;">string</span><span style="font-size:x-small;"> strName,</span><span style="color:#0000ff;font-size:x-small;">string</span><span style="font-size:x-small;"> strDescription,</span><span style="color:#0000ff;font-size:x-small;">int</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> nLeader,<br />
</span><span style="color:#0000ff;font-size:x-small;">out</span><span style="font-size:x-small;"> </span><span style="color:#0000ff;font-size:x-small;">int</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;"> nAlreadyIn)<br />
{<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#008000;font-size:x-small;">// Establish Connection<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;">SqlConnection oConnection =  GetConnection();<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;">// build  the command<br />
</span><span style="font-size:x-small;">SqlCommand oCommand = </span><span style="color:#0000ff;font-size:x-small;">new</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;"> SqlCommand(&#8220;InsertProject&#8221;,oConnection);<br />
oCommand.CommandType=CommandType.StoredProcedure;<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;">//  Parameters<br />
</span><span style="font-size:x-small;">SqlParameter paraName= </span><span style="color:#0000ff;font-size:x-small;">new</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> SqlParameter(&#8220;@Name&#8221;,SqlDbType.Char,50);<br />
paraName.Value=strName;<br />
oCommand.Parameters.Add(paraName);<br />
SqlParameter  paraDescription= </span><span style="color:#0000ff;font-size:x-small;">new</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> SqlParameter(&#8220;@Description&#8221;,SqlDbType.Char,150);<br />
paraDescription.Value=strDescription;  oCommand.Parameters.Add(paraDescription);<br />
SqlParameter paraLeader = </span><span style="color:#0000ff;font-size:x-small;">new</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;"> SqlParameter(&#8220;@Leader&#8221;,SqlDbType.Int);paraLeader.Value=nLeader;<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;">oCommand.Parameters.Add(paraLeader);<br />
SqlParameter paraAlreadyIn =  newSqlParameter(&#8220;@AlreadyIn&#8221;,SqlDbType.Int);<br />
paraAlreadyIn.Direction=ParameterDirection.Output;<br />
oCommand.Parameters.Add(paraAlreadyIn);<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#0000ff;font-size:x-small;">try<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">{<br />
oConnection.Open();<br />
oCommand.ExecuteNonQuery();<br />
nAlreadyIn=(</span><span style="color:#0000ff;font-size:x-small;">int</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">) paraAlreadyIn.Value;<br />
}<br />
</span><span style="color:#0000ff;font-size:x-small;">catch</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;">(Exception  oException){<br />
</span><span style="color:#0000ff;font-size:x-small;"><br />
<span style="font-family:Verdana,Arial,Helvetica,sans-serif;">throw</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;"> oException;}<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#0000ff;font-size:x-small;">finally<br />
</span><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">{<br />
oConnection.Close();<br />
}<br />
}</p>
<p></span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>Fig 10  (Method  DAProject.Insert)</strong></span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">A typical Non Query  Data  Access method might  be described  abstractly like this:</p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">(see Fig 10) </span></span></p>
<ul><span></p>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Establish  SqlConnection.</span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Create a SqlCommand and  the SqlParameters to the command.</span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Open the connection and  execute the query.</span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Retrieve  the values from  all output parameters.</span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Close the  SqlConnection.</span></li>
<p></span></ul>
<p><span><span style="color:#0000ff;font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">public</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> </span><span style="color:#0000ff;font-size:x-small;">class</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;"> BLBasis<br />
{<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;">// Current HttpContext<br />
</span><span style="color:#0000ff;font-size:x-small;">protected</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> HttpContext  oCurrentContext;<br />
</span><span style="color:#0000ff;font-size:x-small;">public</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> BLBasis()<br />
{<br />
oCurrentContext= HttpContext.Current;<br />
}<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;summary&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;"> returns true, if the web client authorized or  not<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span><span style="color:#808080;font-size:x-small;">&lt;/summary&gt;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;"><br />
</span><span style="color:#0000ff;font-size:x-small;">public</span><span style="font-size:x-small;"> </span><span style="color:#0000ff;font-size:x-small;">bool</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;"> IsAuthenticated<br />
{<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#0000ff;font-size:x-small;">get<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">{<br />
</span><span style="color:#0000ff;font-size:x-small;">return</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> oCurrentContext.User.Identity.IsAuthenticated;<br />
}<br />
}<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;summary&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;"> returns the UserID,if the user already  authorized<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;/summary&gt;<br />
</span><span style="color:#0000ff;font-size:x-small;">public</span><span style="font-size:x-small;"> </span><span style="color:#0000ff;font-size:x-small;">int</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;"> UserId<br />
{<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#0000ff;font-size:x-small;">get<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">{<br />
</span><span style="color:#0000ff;font-size:x-small;">f</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">(IsAuthenticated)<br />
{<br />
</span><span style="color:#0000ff;font-size:x-small;">string</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> strHelp=oCurrentContext.User.Identity.Name;<br />
</span><span style="color:#0000ff;font-size:x-small;">return</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> Int32.Parse(strHelp);<br />
</span><span style="font-size:x-small;">}</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#0000ff;font-size:x-small;">else<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">{<br />
</span><span style="color:#0000ff;font-size:x-small;">return</span></span><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"> -1;<br />
}<br />
}<br />
}<br />
}</p>
<p></span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>Fig 11  (class  BLBasis)</strong></span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>2.3.2   Implementing Business Tier</p>
<p></strong></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">All classes of Business Tier have  the super class BLBasis (Fig 11) and it will supply its derived classes session  relevant informations such like  UserID .   The web application uses the  attribute UserID  to identify the current user. We use the method public static  void FormsAuthentication . Redirect-FromLoginPage( string userName, bool  createPersistentCookie)  to assign the user identity in to the current instance  of the HttpContext class.</p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Now, let us analyze a class of this  tier in order to understand the pattern. The class BLPInvolvement is a Business  Logic class and gathers all interrelated methods, which deal with the topic  project involvement. The method  public void    BLPInvolvement.GetDayRecord(DateTime dtEntry,out double dTotal out DataSet  dsDayRecord)  (see Fig 12) is responsible to pass a Dataset and a numeric value  to the Presentation Layer.</p>
<p></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>Fig 12 ( class  BLPInvolvement)</strong></span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">A typical Business Logic  method might abstractly described like this:</span></span></p>
<ul><span></p>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Instantiate an Data  Access object </span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Retrieve the  crude data. </span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Calculate business values  from the  crude data. </span></li>
<p></span></ul>
<p><span><strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">2.4  Implementing  Presentation Tier</p>
<p></span></strong><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">We have used ASP.NET to implement  the Presentation Layer and now we like to show you exemplarily , how  the  Presentation Layer communicates with the Data Access Layer. The Figure 0 shows  the web side  TimeEntry.aspx, where an employee can record his project  activities for a certain day. The method  private void  TimeEntry.btnEnter_Click(object sender, System.EventArgs e)  is a callback  method, which will be activated, if  the user pushes the enter button.</p>
<p></span><span style="color:#808080;font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">///</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#008000;font-size:x-small;"> </span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;summary&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;"> this method populates datagrid dgSummary<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span><span style="color:#808080;font-size:x-small;">&lt;/summary&gt;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;"><br />
</span><span style="color:#0000ff;font-size:x-small;">void</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;"> PopulateDataGrid(DateTime  dtEntry)<br />
{<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#0000ff;font-size:x-small;">try<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;">{<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;">//  retrive DataSet and bind to the datagrid<br />
</span><span style="font-size:x-small;">BLPInvolvement  oBLPInvolvement = </span><span style="color:#0000ff;font-size:x-small;">new</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> BLPInvolvement();<br />
DataSet oDataSet;<br />
</span><span style="color:#0000ff;font-size:x-small;">double</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> dTotalDuration;<br />
oBLPInvolvement.GetDayRecord(dtEntry,</span><span style="color:#0000ff;font-size:x-small;">out</span><span style="font-size:x-small;"> dTotalDuration,</span><span style="color:#0000ff;font-size:x-small;">out</span><span style="font-size:x-small;"> oDataSet);<br />
</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;">DataTable  dtDayRecord=oDataSet.Tables["dtDayRecord"];<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#0000ff;font-size:x-small;">if</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;">(dtDayRecord.Rows.Count&gt;0)<br />
{<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;">dgSummary.DataSource=dtDayRecord;<br />
dgSummary.DataBind();<br />
lbDGTitel.Text=&#8221;Date:  &#8220;+dtEntry.ToShortDateString()<br />
+&#8221; Sum: &#8220;+dTotalDuration.ToString();<br />
}<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;color:#0000ff;font-size:x-small;">else<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">{<br />
dgSummary.DataSource=</span><span style="color:#0000ff;font-size:x-small;">null</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">;dgSummary.DataBind();</p>
<p>lbDGTitel.Text=&#8221;No Records found&#8221;;<br />
}<br />
}<br />
</span><span style="color:#0000ff;font-size:x-small;">catch</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">(Exception  oException)<br />
{<br />
</span><span style="color:#0000ff;font-size:x-small;">this</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;">.HelpException(oException);<br />
}<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">}<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span><span style="color:#808080;font-size:x-small;">&lt;summary&gt;</span><span style="color:#808080;font-size:x-small;">///</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;"> It is used publish exception text<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#808080;font-size:x-small;">&lt;/summary&gt;<br />
</span><span style="color:#808080;font-size:x-small;">///</span><span style="color:#008000;font-size:x-small;"> </span><span style="color:#808080;font-size:x-small;">&lt;param  name=&#8221;oException&#8221;&gt;&lt;/param&gt;</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="color:#008000;font-size:x-small;"><br />
</span><span style="color:#0000ff;font-size:x-small;">private</span><span style="font-size:x-small;"> </span><span style="color:#0000ff;font-size:x-small;">void</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;"> HelpException(Exception oException)<br />
{<br />
</span><span style="color:#0000ff;font-size:x-small;">if</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;">(lbMessage.Text!=&#8221;")<br />
{<br />
lbMessage.Text+=oException.Message;<br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">}<br />
</span><span style="color:#0000ff;font-size:x-small;">else</span></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;"><br />
</span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-size:x-small;">lbMessage.Text=oException.Message;<br />
}</p>
<p></span><strong>Fig 12   (Extract from the class  TimeEntry)</strong></span></span></p>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">The Figure 12 shows a  partial source code, which is responsible for inserting a new project  involvement record. The method takes following steps to accomplish the  Task:</span></span></p>
<ul><span></p>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Draw off the values  from  GUI controls.</span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Instantiate an object  from the Class BLPInvolvement  and insert it in to the database.</span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Update the other involved  GUI controls.</span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Publish the error message  , if an error  occurred in the Logic Tier or in Data Tier. </span></li>
<p></span></ul>
<p><span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><strong>2.5   Conclusion</p>
<p></strong></span><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">If we look back implementation  phase, we can say that it is quite simple to build a 3-Tier Architecture using  Microsoft.NET. I think the following tips are useful to increase transparency  and stability of the system:</span></span></p>
<ul><span></p>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Follow the adjacent rule   (Dont jump over a neighbor tier ,because it makes us easy to follow  systematically from the button click to  database access).
<p></span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Use Web.config  file to  define global values.
<p></span></li>
<li><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Use  try, catch and  finally  control structures in every tier to track bugs.</span></li>
<p></span></ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/abbus.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/abbus.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abbus.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abbus.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abbus.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abbus.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abbus.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abbus.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abbus.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abbus.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abbus.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abbus.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abbus.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abbus.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abbus.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abbus.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=8&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abbus.wordpress.com/2008/04/15/3_teir-architecture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d67290a099ec0e26dca3f55dcd4b120?s=96&#38;d=identicon" medium="image">
			<media:title type="html">abbus</media:title>
		</media:content>

		<media:content url="Images/Build3tierApp4.jpg" medium="image" />

		<media:content url="Images/Build3tierApp5.jpg" medium="image" />

		<media:content url="Images/Build3tierApp6.gif" medium="image" />
	</item>
		<item>
		<title>how to edit in datagrid veiw</title>
		<link>http://abbus.wordpress.com/2008/04/11/how-to-edit-in-datagrid-veiw/</link>
		<comments>http://abbus.wordpress.com/2008/04/11/how-to-edit-in-datagrid-veiw/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 13:56:11 +0000</pubDate>
		<dc:creator>abbus</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://abbus.wordpress.com/?p=7</guid>
		<description><![CDATA[ Textbox1.tb=gridveiw1.editindex.cells(1).control[0]; string str=tb.text;  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=7&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p> Textbox1.tb=gridveiw1.editindex.cells(1).control[0];</p>
<p>string str=tb.text;</p>
<p> </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/abbus.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/abbus.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abbus.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abbus.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abbus.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abbus.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abbus.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abbus.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abbus.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abbus.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abbus.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abbus.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abbus.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abbus.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abbus.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abbus.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=7&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abbus.wordpress.com/2008/04/11/how-to-edit-in-datagrid-veiw/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d67290a099ec0e26dca3f55dcd4b120?s=96&#38;d=identicon" medium="image">
			<media:title type="html">abbus</media:title>
		</media:content>
	</item>
		<item>
		<title>Insert data into database</title>
		<link>http://abbus.wordpress.com/2008/04/02/insert-data-into-database/</link>
		<comments>http://abbus.wordpress.com/2008/04/02/insert-data-into-database/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 06:51:05 +0000</pubDate>
		<dc:creator>abbus</dc:creator>
				<category><![CDATA[c# files]]></category>

		<guid isPermaLink="false">http://abbus.wordpress.com/2008/04/02/insert-data-into-database/</guid>
		<description><![CDATA[con = new SqlConnection(str); con.Open(); com = new SqlCommand(&#8220;insert into registration values (&#8216;&#8221; + tbusername.Text + &#8220;&#8216;,&#8217;&#8221; +(Password1.Value) + &#8220;&#8216;,&#8221;+ DropDownList1.SelectedValue +&#8221; ,  &#8216;&#8221; + tbanswer.Text + &#8220;&#8216;, &#8216;&#8221; + tbdesignation.Text + &#8220;&#8216;,&#8217;&#8221; + tbplace.Text + &#8220;&#8216;) &#8220;, con); int dr=com.ExecuteNonQuery(); con.Close(); if (dr&#62;0) { Response.Redirect(&#8220;~/loginsucess.aspx&#8221;); } con.Close();<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=6&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>con = new SqlConnection(str);<br />
con.Open();<br />
com = new SqlCommand(&#8220;insert into registration values (&#8216;&#8221; + tbusername.Text + &#8220;&#8216;,&#8217;&#8221; +(Password1.Value) + &#8220;&#8216;,&#8221;+ DropDownList1.SelectedValue +&#8221; ,  &#8216;&#8221; + tbanswer.Text + &#8220;&#8216;, &#8216;&#8221; + tbdesignation.Text + &#8220;&#8216;,&#8217;&#8221; + tbplace.Text + &#8220;&#8216;) &#8220;, con);<br />
int dr=com.ExecuteNonQuery();<br />
con.Close();<br />
if (dr&gt;0)<br />
{<br />
Response.Redirect(&#8220;~/loginsucess.aspx&#8221;);<br />
}<br />
con.Close();</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/abbus.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/abbus.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abbus.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abbus.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abbus.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abbus.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abbus.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abbus.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abbus.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abbus.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abbus.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abbus.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abbus.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abbus.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abbus.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abbus.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=6&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abbus.wordpress.com/2008/04/02/insert-data-into-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d67290a099ec0e26dca3f55dcd4b120?s=96&#38;d=identicon" medium="image">
			<media:title type="html">abbus</media:title>
		</media:content>
	</item>
		<item>
		<title>confirigation from Web congig files</title>
		<link>http://abbus.wordpress.com/2008/04/02/confirigation-from-web-congig-files/</link>
		<comments>http://abbus.wordpress.com/2008/04/02/confirigation-from-web-congig-files/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 06:44:55 +0000</pubDate>
		<dc:creator>abbus</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://abbus.wordpress.com/?p=5</guid>
		<description><![CDATA[config file: &#60;add key=&#8221;constring&#8221; value=&#8221;server=localhost;uid=sa;pwd=admin;initial catalog=Live-14-02-08;&#8221;&#62;&#60;/add&#62; &#60;add key=&#8221;abbu&#8221; value=&#8221;server=localhost;uid=sa;pwd=imi@123;initial catalog=pubs&#8221;&#62;&#60;/add&#62; &#60;using form c#&#62; string str = ConfigurationManager.AppSettings["abbu"].ToString(); string str1=ConfigurationManager.AppSettings["constring"].ToString();<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=5&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>config file:</p>
<p>&lt;add key=&#8221;constring&#8221; value=&#8221;server=localhost;uid=sa;pwd=admin;initial catalog=Live-14-02-08;&#8221;&gt;&lt;/add&gt;<br />
&lt;add key=&#8221;abbu&#8221; value=&#8221;server=localhost;uid=sa;pwd=imi@123;initial catalog=pubs&#8221;&gt;&lt;/add&gt;</p>
<p>&lt;using form c#&gt;</p>
<p>string str = ConfigurationManager.AppSettings["abbu"].ToString();<br />
string str1=ConfigurationManager.AppSettings["constring"].ToString();</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/abbus.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/abbus.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abbus.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abbus.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abbus.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abbus.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abbus.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abbus.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abbus.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abbus.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abbus.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abbus.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abbus.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abbus.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abbus.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abbus.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=5&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abbus.wordpress.com/2008/04/02/confirigation-from-web-congig-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d67290a099ec0e26dca3f55dcd4b120?s=96&#38;d=identicon" medium="image">
			<media:title type="html">abbus</media:title>
		</media:content>
	</item>
		<item>
		<title>How to fill drop down list</title>
		<link>http://abbus.wordpress.com/2008/04/02/how-to-fill-drop-down-list/</link>
		<comments>http://abbus.wordpress.com/2008/04/02/how-to-fill-drop-down-list/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 06:44:17 +0000</pubDate>
		<dc:creator>abbus</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://abbus.wordpress.com/?p=3</guid>
		<description><![CDATA[con = new SqlConnection(str); cmd = new SqlCommand(&#8220;select * from emptable&#8221;, con); da = new SqlDataAdapter(cmd); da.Fill(ds,&#8221;emptable&#8221;); DropDownList2.DataSource = ds.Tables[1]; DropDownList2.DataValueField = &#8220;firstname&#8221;; DropDownList2.DataBind();<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=3&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>con = new SqlConnection(str);<br />
cmd = new SqlCommand(&#8220;select * from emptable&#8221;, con);<br />
da = new SqlDataAdapter(cmd);<br />
da.Fill(ds,&#8221;emptable&#8221;);<br />
DropDownList2.DataSource = ds.Tables[1];<br />
DropDownList2.DataValueField = &#8220;firstname&#8221;;<br />
DropDownList2.DataBind();</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/abbus.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/abbus.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abbus.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abbus.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abbus.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abbus.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abbus.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abbus.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abbus.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abbus.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abbus.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abbus.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abbus.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abbus.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abbus.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abbus.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abbus.wordpress.com&amp;blog=3330125&amp;post=3&amp;subd=abbus&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abbus.wordpress.com/2008/04/02/how-to-fill-drop-down-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8d67290a099ec0e26dca3f55dcd4b120?s=96&#38;d=identicon" medium="image">
			<media:title type="html">abbus</media:title>
		</media:content>
	</item>
	</channel>
</rss>
