<?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/"
	>

<channel>
	<title>C# 411 &#187; Collections</title>
	<atom:link href="http://www.csharp411.com/category/collections/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.csharp411.com</link>
	<description>C# Development</description>
	<lastBuildDate>Sat, 19 Nov 2011 19:34:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>C# Custom Enumerators Made Simple with the Yield Keyword</title>
		<link>http://www.csharp411.com/c-custom-enumerators-made-simple-with-the-yield-keyword/</link>
		<comments>http://www.csharp411.com/c-custom-enumerators-made-simple-with-the-yield-keyword/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 15:24:55 +0000</pubDate>
		<dc:creator>Timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Collections]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.csharp411.com/c-custom-enumerators-made-simple-with-the-yield-keyword/</guid>
		<description><![CDATA[An enumerator enables you to iterate over a collection in a foreach loop.&#160; You can use foreach to iterate over all C# collection classes, because all C# collection classes inherit from the IEnumerable interface (regular or generic).&#160; IEnumerable contains the GetEnumerator method, which returns an enumerator. Occasionally you may find a need to create a [...]]]></description>
		<wfw:commentRss>http://www.csharp411.com/c-custom-enumerators-made-simple-with-the-yield-keyword/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Iterate Over IDictionary</title>
		<link>http://www.csharp411.com/how-to-iterate-idictionary/</link>
		<comments>http://www.csharp411.com/how-to-iterate-idictionary/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 15:11:03 +0000</pubDate>
		<dc:creator>Timm</dc:creator>
				<category><![CDATA[Collections]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.csharp411.com/how-to-iterate-idictionary/</guid>
		<description><![CDATA[To iterate over an IDictionary&#60;x,y&#62; interface, use the KeyValuePair&#60;x,y&#62; structure.&#160; Following is a simple example: This example produces the following output: Right=Drive, Age=16 Right=Vote, Age=18 Right=Drink, Age=21]]></description>
		<wfw:commentRss>http://www.csharp411.com/how-to-iterate-idictionary/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Sort C# Array in Descending/Reverse Order</title>
		<link>http://www.csharp411.com/sort-c-array-in-descendingreverse-order/</link>
		<comments>http://www.csharp411.com/sort-c-array-in-descendingreverse-order/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 14:44:57 +0000</pubDate>
		<dc:creator>Timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Collections]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.csharp411.com/sort-c-array-in-descendingreverse-order/</guid>
		<description><![CDATA[How do you sort a C# array in descending or reverse order?  A simple way is to sort the array in ascending order, then reverse it: Of course, this is not efficient for large arrays. A better approach is to create a custom Comparer.  Following is a nice generics class that will sort an array [...]]]></description>
		<wfw:commentRss>http://www.csharp411.com/sort-c-array-in-descendingreverse-order/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>C# Empty Enumerator</title>
		<link>http://www.csharp411.com/c-empty-enumerator/</link>
		<comments>http://www.csharp411.com/c-empty-enumerator/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 13:19:20 +0000</pubDate>
		<dc:creator>Timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Collections]]></category>
		<category><![CDATA[Generics]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.csharp411.com/c-empty-enumerator/</guid>
		<description><![CDATA[This article provides C# code for an empty enumerator.&#160; This generic class can be used to simulate enumeration over an empty collection of any type of objects.&#160; Here is the code: using System; using System.Collections; using System.Collections.Generic; public class EmptyEnumerator&#60;T&#62; : IEnumerator&#60;T&#62; { public T Current { get { return default(T); } } object IEnumerator.Current [...]]]></description>
		<wfw:commentRss>http://www.csharp411.com/c-empty-enumerator/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Multiple Generic IEnumerable</title>
		<link>http://www.csharp411.com/multiple-generic-ienumerablet/</link>
		<comments>http://www.csharp411.com/multiple-generic-ienumerablet/#comments</comments>
		<pubDate>Wed, 28 May 2008 19:28:04 +0000</pubDate>
		<dc:creator>Timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Collections]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.csharp411.com/multiple-generic-ienumerablet/</guid>
		<description><![CDATA[It&#8217;s possible to provide multiple generic enumerators for a single class.&#160; The trick is that clients must specify which enumerator to use. For example, here is a &#8220;MyNumbers&#8221; class with multiple generic enumerators (in this case, for custom class &#8220;MyInt&#8221; and integer): public class MyNumbers : IEnumerable&#60;MyInt&#62;, IEnumerable&#60;int&#62; To enumerate through the class, you must [...]]]></description>
		<wfw:commentRss>http://www.csharp411.com/multiple-generic-ienumerablet/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Enumerate Collections without Exceptions</title>
		<link>http://www.csharp411.com/enumerate-collections-without-exceptions/</link>
		<comments>http://www.csharp411.com/enumerate-collections-without-exceptions/#comments</comments>
		<pubDate>Tue, 06 May 2008 13:35:25 +0000</pubDate>
		<dc:creator>Timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Collections]]></category>
		<category><![CDATA[Threading]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.csharp411.com/enumerate-collections-without-exceptions/</guid>
		<description><![CDATA[It&#8217;s important to note that an enumerator does not have exclusive, thread-safe access to its collection.&#160; Even when a collection is synchronized, other threads can still modify the collection.&#160; Therefore, a collection&#8217;s contents can change while enumerating through it, which will cause the enumerator to throw an exception.&#160; So there are three key ways to [...]]]></description>
		<wfw:commentRss>http://www.csharp411.com/enumerate-collections-without-exceptions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Grow Your Own SyncRoot</title>
		<link>http://www.csharp411.com/grow-your-own-syncroot/</link>
		<comments>http://www.csharp411.com/grow-your-own-syncroot/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 16:18:22 +0000</pubDate>
		<dc:creator>Timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Collections]]></category>
		<category><![CDATA[Threading]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[ArrayList]]></category>
		<category><![CDATA[Multithreading]]></category>
		<category><![CDATA[SyncRoot]]></category>

		<guid isPermaLink="false">http://www.csharp411.com/grow-your-own-syncroot/</guid>
		<description><![CDATA[Multi-threaded code is challenging to get right and even harder to debug once it&#8217;s gone wrong. This is especially true when attempting to collect data from multiple threads. To make this easier, many .NET collection classes include the SyncRoot property to maintain proper synchronization with other threads that might be simultaneously modifying the collection. But [...]]]></description>
		<wfw:commentRss>http://www.csharp411.com/grow-your-own-syncroot/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Reverse an Array</title>
		<link>http://www.csharp411.com/reverse-an-array/</link>
		<comments>http://www.csharp411.com/reverse-an-array/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 15:49:00 +0000</pubDate>
		<dc:creator>Timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Collections]]></category>
		<category><![CDATA[Generics]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/reverse-an-array/</guid>
		<description><![CDATA[It&#8217;s easy to reverse the contents of an array using C# generics: static T[] ReverseArray&#60;T&#62;( T[] array ) { T[] newArray = null; int count = array == null ? 0 : array.Length; if (count &#62; 0) { newArray = new T[count]; for (int i = 0, j = count - 1; i &#60; count; [...]]]></description>
		<wfw:commentRss>http://www.csharp411.com/reverse-an-array/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Convert Generic ICollection</title>
		<link>http://www.csharp411.com/convert-generic-icollectiont/</link>
		<comments>http://www.csharp411.com/convert-generic-icollectiont/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 14:21:44 +0000</pubDate>
		<dc:creator>Timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Collections]]></category>
		<category><![CDATA[Generics]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Generics-Variance]]></category>
		<category><![CDATA[ICollection]]></category>

		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/convert-generic-icollectiont/</guid>
		<description><![CDATA[As discussed in a previous article, Generics provides the ability to create strongly-typed collections in C#. Unfortunately, C# currently does not support generics variance, which would allow inheritance of generic types. Generics Variance: Not Allowed For example, imagine two classes: public class A {} public class B : A {} Now imagine two generic List [...]]]></description>
		<wfw:commentRss>http://www.csharp411.com/convert-generic-icollectiont/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>KeyedCollection: Dictionary for Values with Embedded Keys</title>
		<link>http://www.csharp411.com/keyedcollection-dictionary-for-values-with-embedded-keys/</link>
		<comments>http://www.csharp411.com/keyedcollection-dictionary-for-values-with-embedded-keys/#comments</comments>
		<pubDate>Mon, 04 Feb 2008 16:24:19 +0000</pubDate>
		<dc:creator>Timm</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Collections]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Dictionary]]></category>
		<category><![CDATA[GetKeyForItem]]></category>
		<category><![CDATA[IDictionary]]></category>
		<category><![CDATA[IList]]></category>
		<category><![CDATA[KeyedCollection]]></category>

		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/keyedcollection-dictionary-for-values-with-embedded-keys/</guid>
		<description><![CDATA[If you need a collection of objects accessed by a key, and the key is one of the object&#8217;s properties, then you should use the KeyedCollection class instead of Dictionary. For example, you would use a KeyedCollection to store Employee objects accessed by the employee&#8217;s ID property. The KeyedCollection class is a hybrid between an [...]]]></description>
		<wfw:commentRss>http://www.csharp411.com/keyedcollection-dictionary-for-values-with-embedded-keys/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

