<?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>WAFY&#039;s .NET Specialists Blog &#187; .NET Simplified</title>
	<atom:link href="http://www.wafytech.com/blog/category/net-simplified/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wafytech.com/blog</link>
	<description>Development &#38; Training in .NET</description>
	<lastBuildDate>Sun, 06 May 2012 06:07:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Visual studio shortcuts for the .NET developer</title>
		<link>http://www.wafytech.com/blog/for-the-love-of-c-net/visual-studio-shortcuts-for-the-net-developer/</link>
		<comments>http://www.wafytech.com/blog/for-the-love-of-c-net/visual-studio-shortcuts-for-the-net-developer/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 12:01:48 +0000</pubDate>
		<dc:creator>Felix</dc:creator>
				<category><![CDATA[.NET Simplified]]></category>
		<category><![CDATA[.NET Training]]></category>
		<category><![CDATA[.NET Training Chennai]]></category>
		<category><![CDATA[.NET Training in Chennai]]></category>
		<category><![CDATA[For the love of C# .NET]]></category>
		<category><![CDATA[Visual Studio 11]]></category>
		<category><![CDATA[Visual Studio Shortcuts]]></category>

		<guid isPermaLink="false">http://blog.wafytech.com/?p=215</guid>
		<description><![CDATA[Almost every student asks me how to remember the namespaces for the classes. It&#8217;s plain simple, Visual Studio has a very useful shortcut for finding the namespace of a class. It comes in very handy when you are working on projects and you need to be fast typing code. So here are the steps to]]></description>
			<content:encoded><![CDATA[<p>Almost every student asks me how to remember the namespaces for the classes. It&#8217;s plain simple, Visual Studio has a very useful shortcut for finding the namespace of a class. It comes in very handy when you are working on projects and you need to be fast typing code. So here are the steps to use it.</p>
<blockquote><p>Type the name of the Class, highlight it and press Shift + Alt + F10, phew! you got your namespace.</p></blockquote>
<p>Use the drop down displayed to do the following:</p>
<p>1. Add the namespace displayed to the usings clause<br />
2. Fully qualify your class<br />
3. Generate a new class<br />
4. Generate a new type</p>
<p>The other shortcut that I find very useful is for declaring properties:</p>
<blockquote><p>To declare a property just type prop and press TAB TAB. Now type in the datatype and a the name for the property.</p></blockquote>
<p>There&#8217;s also a shortcut to implement interfaces automatically. This would save you tons of time in implementing interfaces.</p>
<blockquote><p>Declare the class and type the name of the interface. Now, highlight the interface that you&#8217;d like to implement and press Shift + Alt + F10. Select the corresponding option in the dropdown &#8211; Implement interface (or) Explicitly implement interface</p></blockquote>
<p>Felix.J, PMP<br />
View <a href="http://www.wafytech.com/training">Upcoming Dot Net Courses</a> by <a href="http://www.wafytech.com/">WAFY</a></p>
<h4>Incoming search terms:</h4><ul><li><a href="http://www.wafytech.com/blog/for-the-love-of-c-net/visual-studio-shortcuts-for-the-net-developer/" title="visual studio shortcuts">visual studio shortcuts</a></li><li><a href="http://www.wafytech.com/blog/for-the-love-of-c-net/visual-studio-shortcuts-for-the-net-developer/" title="shortcuts in net for a developer">shortcuts in net for a developer</a></li><li><a href="http://www.wafytech.com/blog/for-the-love-of-c-net/visual-studio-shortcuts-for-the-net-developer/" title="visual studio shortcut interface">visual studio shortcut interface</a></li><li><a href="http://www.wafytech.com/blog/for-the-love-of-c-net/visual-studio-shortcuts-for-the-net-developer/" title="visual studio shortcuts typing namespaces">visual studio shortcuts typing namespaces</a></li></ul><p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;counturl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;count=none&amp;text=Visual%20studio%20shortcuts%20for%20the%20.NET%20developer" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;counturl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;count=none&amp;text=Visual%20studio%20shortcuts%20for%20the%20.NET%20developer" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a href="javascript:if(document.all){window.external.AddFavorite('http://www.wafytech.com/blog/for-the-love-of-c-net/visual-studio-shortcuts-for-the-net-developer/','Visual%20studio%20shortcuts%20for%20the%20.NET%20developer')}else{var%20b=a2a_config.localize.BookmarkInstructions%20||%20'Press%20Ctrl+D%20to%20bookmark%20this%20page';alert(a2a_config.localize.BookmarkInstructions)}" title="Bookmark/Favorites" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/bookmark.png" width="16" height="16" alt="Bookmark/Favorites"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;linkname=Visual%20studio%20shortcuts%20for%20the%20.NET%20developer" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;linkname=Visual%20studio%20shortcuts%20for%20the%20.NET%20developer" title="Digg" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;linkname=Visual%20studio%20shortcuts%20for%20the%20.NET%20developer" title="Email" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;linkname=Visual%20studio%20shortcuts%20for%20the%20.NET%20developer" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a><a class="a2a_button_orkut" href="http://www.addtoany.com/add_to/orkut?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;linkname=Visual%20studio%20shortcuts%20for%20the%20.NET%20developer" title="Orkut" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/orkut.png" width="16" height="16" alt="Orkut"/></a><a class="a2a_button_posterous" href="http://www.addtoany.com/add_to/posterous?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;linkname=Visual%20studio%20shortcuts%20for%20the%20.NET%20developer" title="Posterous" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/posterous.png" width="16" height="16" alt="Posterous"/></a><a class="a2a_button_printfriendly" href="http://www.addtoany.com/add_to/printfriendly?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;linkname=Visual%20studio%20shortcuts%20for%20the%20.NET%20developer" title="PrintFriendly" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/printfriendly.png" width="16" height="16" alt="PrintFriendly"/></a><a class="a2a_button_tumblr" href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;linkname=Visual%20studio%20shortcuts%20for%20the%20.NET%20developer" title="Tumblr" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;linkname=Visual%20studio%20shortcuts%20for%20the%20.NET%20developer" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fvisual-studio-shortcuts-for-the-net-developer%2F&amp;title=Visual%20studio%20shortcuts%20for%20the%20.NET%20developer" id="wpa2a_2"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wafytech.com/blog/for-the-love-of-c-net/visual-studio-shortcuts-for-the-net-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Training on Queue, Stack, HashTable, SortedList and Indexer</title>
		<link>http://www.wafytech.com/blog/for-the-love-of-c-net/training-on-queue-stack-hashtable-sortedlist-and-indexer/</link>
		<comments>http://www.wafytech.com/blog/for-the-love-of-c-net/training-on-queue-stack-hashtable-sortedlist-and-indexer/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 11:43:10 +0000</pubDate>
		<dc:creator>Felix</dc:creator>
				<category><![CDATA[.NET Simplified]]></category>
		<category><![CDATA[.NET Training]]></category>
		<category><![CDATA[.NET Training Chennai]]></category>
		<category><![CDATA[.NET Training in Chennai]]></category>
		<category><![CDATA[For the love of C# .NET]]></category>
		<category><![CDATA[HashTable]]></category>
		<category><![CDATA[Indexer]]></category>
		<category><![CDATA[Queue]]></category>
		<category><![CDATA[SortedList]]></category>
		<category><![CDATA[Stack]]></category>

		<guid isPermaLink="false">http://blog.wafytech.com/?p=140</guid>
		<description><![CDATA[The below is the code that was discussed and created during the training session about using the collections and List available in .NET like Queue, Stack, HashTable and SortedList. In the process, using Indexers were also covered. Students were asked to create a small application using everything learnt. The extract of that code is given]]></description>
			<content:encoded><![CDATA[<pre>The below is the code that was discussed and created during the training session about using the collections and List available in .NET like Queue, Stack, HashTable and SortedList. In the process, using Indexers were also covered. Students were asked to create a small application using everything learnt. The extract of that code is given below.
<pre class="brush: csharp; title: ; notranslate">

        private void RunExample()
        {
            // Queue Example
            QueueExample();

            // Stack Example
            StackExample();

            // Hash Table Example
            HashTableExample();

            // Hash Table Example
            SortedListExample();

            // Indexer Example
            Indexer();
        }

        private void QueueExample()
        {
            Queue&lt;Employee&gt; employeeQueue = new Queue&lt;Employee&gt;();
            // Load Applicants
            for (int i = 1; i &lt;= 10; i++)
            {
                Employee employee = new Employee() { Name = &quot;Employee No. &quot; + i.ToString() };
                employeeQueue.Enqueue(employee);
                lstEmployeeQueue.Items.Add(employee.Name);
            }

            // Select 5 applicants based on their order in the queue
            for (int i = 1; i &lt;= 5; i++)
            {
                Employee queuedEmployee = employeeQueue.Dequeue();
                lstEmployeeSelected.Items.Add(queuedEmployee.Name);
            }
        }

        private void StackExample()
        {
            Stack&lt;Employee&gt; seniorityStack = new Stack&lt;Employee&gt;();

            // Load Employees
            for (int i = 10; i &gt;= 1; i--)
            {
                Employee employee = new Employee() { Name = &quot;Employee Exp: &quot; + i.ToString() + &quot; Years.&quot;};
                seniorityStack.Push(employee);
                lstSeniority.Items.Add(employee.Name);
            }

            // Select 5 junior employees based on their level of seniority
            for (int i = 1; i &lt;= 5; i++)
            {
                Employee juniorEmployee = seniorityStack.Pop();
                lstTerminated.Items.Add(juniorEmployee.Name);
            }
        }

        private void HashTableExample()
        {
            country.Add(&quot;US&quot;, &quot;United States&quot;);
            country.Add(&quot;UK&quot;, &quot;United Kingdom&quot;);
            country.Add(&quot;IN&quot;, &quot;India&quot;);
            country.Add(&quot;AU&quot;, &quot;Australia&quot;);
            country.Add(&quot;CA&quot;, &quot;Canada&quot;);

            cmbCountry.Items.Add(country[&quot;US&quot;].ToString());
            cmbCountry.Items.Add(country[&quot;UK&quot;].ToString());
            cmbCountry.Items.Add(country[&quot;IN&quot;].ToString());
            cmbCountry.Items.Add(country[&quot;AU&quot;].ToString());
            cmbCountry.Items.Add(country[&quot;CA&quot;].ToString());
        }

        private void cmbCountry_SelectedIndexChanged(object sender, EventArgs e)
        {
            foreach (DictionaryEntry de in country)
            {
                if (de.Value.Equals(cmbCountry.Text))
                {
                    lblCode.Text = de.Key.ToString();
                    lblCountry.Text = de.Value.ToString();
                    return;
                }
            }
        }

        private void SortedListExample()
        {
            // Load employees into ArrayList that's unsorted
            ArrayList employeeListUnSorted = new ArrayList();

            employeeListUnSorted.Add(new Employee() { Name = &quot;Lakshman&quot; });
            employeeListUnSorted.Add(new Employee() { Name = &quot;Richard&quot; });
            employeeListUnSorted.Add(new Employee() { Name = &quot;Arjun&quot; });
            employeeListUnSorted.Add(new Employee() { Name = &quot;John&quot; });
            employeeListUnSorted.Add(new Employee() { Name = &quot;Rajesh&quot; });
            employeeListUnSorted.Add(new Employee() { Name = &quot;Kareem&quot; });

            foreach (Employee employee in employeeListUnSorted)
            {
                lstUnSorted.Items.Add(employee.Name);
            }

            // Create Sorted List from UnSorted list
            SortedList&lt;string, Employee&gt; employeeListSorted = new SortedList&lt;string, Employee&gt;();
            foreach (Employee employee in employeeListUnSorted)
            {
                employeeListSorted.Add(employee.Name, employee);
            }

            // Display the employees in SortedList
            foreach (string key in employeeListSorted.Keys)
            {
                lstSorted.Items.Add(key);
            }
        }

        private void Indexer()
        {
            // The Employee class has an indexer for address defined
            Employee employee = new Employee { Name = &quot;Rakesh&quot; };
            employee[0] = &quot;Address 1&quot;;
            employee[1] = &quot;Address 1&quot;;
            employee[2] = &quot;Address 1&quot;;

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i &lt; 3; i++)
            {
                sb.AppendLine(employee[i]);
            }
            MessageBox.Show(sb.ToString());
        }
</pre>
</pre>
<h4>Incoming search terms:</h4><ul><li><a href="http://www.wafytech.com/blog/for-the-love-of-c-net/training-on-queue-stack-hashtable-sortedlist-and-indexer/" title="c# hashtable indexer">c# hashtable indexer</a></li><li><a href="http://www.wafytech.com/blog/for-the-love-of-c-net/training-on-queue-stack-hashtable-sortedlist-and-indexer/" title="hashtable asp net unsorted">hashtable asp net unsorted</a></li><li><a href="http://www.wafytech.com/blog/for-the-love-of-c-net/training-on-queue-stack-hashtable-sortedlist-and-indexer/" title="indexer in net">indexer in net</a></li></ul><p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;counturl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;count=none&amp;text=Training%20on%20Queue%2C%20Stack%2C%20HashTable%2C%20SortedList%20and%20Indexer" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;counturl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;count=none&amp;text=Training%20on%20Queue%2C%20Stack%2C%20HashTable%2C%20SortedList%20and%20Indexer" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a href="javascript:if(document.all){window.external.AddFavorite('http://www.wafytech.com/blog/for-the-love-of-c-net/training-on-queue-stack-hashtable-sortedlist-and-indexer/','Training%20on%20Queue,%20Stack,%20HashTable,%20SortedList%20and%20Indexer')}else{var%20b=a2a_config.localize.BookmarkInstructions%20||%20'Press%20Ctrl+D%20to%20bookmark%20this%20page';alert(a2a_config.localize.BookmarkInstructions)}" title="Bookmark/Favorites" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/bookmark.png" width="16" height="16" alt="Bookmark/Favorites"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;linkname=Training%20on%20Queue%2C%20Stack%2C%20HashTable%2C%20SortedList%20and%20Indexer" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;linkname=Training%20on%20Queue%2C%20Stack%2C%20HashTable%2C%20SortedList%20and%20Indexer" title="Digg" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;linkname=Training%20on%20Queue%2C%20Stack%2C%20HashTable%2C%20SortedList%20and%20Indexer" title="Email" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;linkname=Training%20on%20Queue%2C%20Stack%2C%20HashTable%2C%20SortedList%20and%20Indexer" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a><a class="a2a_button_orkut" href="http://www.addtoany.com/add_to/orkut?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;linkname=Training%20on%20Queue%2C%20Stack%2C%20HashTable%2C%20SortedList%20and%20Indexer" title="Orkut" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/orkut.png" width="16" height="16" alt="Orkut"/></a><a class="a2a_button_posterous" href="http://www.addtoany.com/add_to/posterous?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;linkname=Training%20on%20Queue%2C%20Stack%2C%20HashTable%2C%20SortedList%20and%20Indexer" title="Posterous" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/posterous.png" width="16" height="16" alt="Posterous"/></a><a class="a2a_button_printfriendly" href="http://www.addtoany.com/add_to/printfriendly?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;linkname=Training%20on%20Queue%2C%20Stack%2C%20HashTable%2C%20SortedList%20and%20Indexer" title="PrintFriendly" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/printfriendly.png" width="16" height="16" alt="PrintFriendly"/></a><a class="a2a_button_tumblr" href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;linkname=Training%20on%20Queue%2C%20Stack%2C%20HashTable%2C%20SortedList%20and%20Indexer" title="Tumblr" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;linkname=Training%20on%20Queue%2C%20Stack%2C%20HashTable%2C%20SortedList%20and%20Indexer" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Ftraining-on-queue-stack-hashtable-sortedlist-and-indexer%2F&amp;title=Training%20on%20Queue%2C%20Stack%2C%20HashTable%2C%20SortedList%20and%20Indexer" id="wpa2a_4"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wafytech.com/blog/for-the-love-of-c-net/training-on-queue-stack-hashtable-sortedlist-and-indexer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# Training on Threading using an example</title>
		<link>http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-threading-using-an-example/</link>
		<comments>http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-threading-using-an-example/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 09:32:06 +0000</pubDate>
		<dc:creator>Subha</dc:creator>
				<category><![CDATA[.NET Simplified]]></category>
		<category><![CDATA[.NET Training]]></category>
		<category><![CDATA[.NET Training Chennai]]></category>
		<category><![CDATA[.NET Training in Chennai]]></category>
		<category><![CDATA[For the love of C# .NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[System Threading]]></category>

		<guid isPermaLink="false">http://blog.wafytech.com/?p=123</guid>
		<description><![CDATA[Today&#8217;s session was about System.Threading. We spoke about the ways in which threading can help develop better applications. 1. Faster code 2. Parallel processing 3. Background processing 4. Priority setting 5. Keep application responding to user inputs, while the thread processes many other functions. 6. Common real-time scenarios in which threads are the most practical]]></description>
			<content:encoded><![CDATA[<p>Today&#8217;s session was about System.Threading. We spoke about the ways in which threading can help develop better applications.</p>
<p>1. Faster code</p>
<p>2. Parallel processing</p>
<p>3. Background processing</p>
<p>4. Priority setting</p>
<p>5. Keep application responding to user inputs, while the thread processes many other functions.</p>
<p>6. Common real-time scenarios in which threads are the most practical solutions.</p>
<p><a href="http://blog.wafytech.com/wp-content/uploads/2011/03/Threading.jpg"><img class="aligncenter size-full wp-image-124" title="Threading" src="http://blog.wafytech.com/wp-content/uploads/2011/03/Threading.jpg" alt="" width="298" height="382" /></a></p>
<p>The above application uses the WorkerThread class to increment the progress bars. The progress bars are incremented to form a sine wave visual. The application when executed will create the illusion of a wave flowing. The full source code is provided to help you understand the concept.</p>
<pre class="brush: csharp; title: ; notranslate">

#region Usings
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
#endregion

namespace ThreadApplication
{
class WorkerThread
{
#region Private Variables
private Thread _thread;
public SineForm sineForm { get; set; }
#endregion

#region Properties
public bool IsAlive
{
get
{
return _thread.IsAlive;
}
}
#endregion

#region Constructor
public WorkerThread()
{
_thread = new Thread(Work);
}
#endregion

#region Public Methods
public void Start(object progressBars)
{
_thread.Start(progressBars);
}

public void Stop()
{
_thread.Abort();
}

private void Work(object progressBars)
{
int loopCount = 1;
int max = loopCount;
bool alternate = false;
while (true)
{
// Set defaults
if (loopCount == 1)
{
for (int i = 9; i &gt;= 0; i--)
{
ProgressBar bar = (ProgressBar)((ArrayList)progressBars)[i];
Increment(bar, max);
max++;
}
}
else
{
int prevValue = 0;
for (int i = 9; i &gt;= 0; i--)
{
ProgressBar bar = (ProgressBar)((ArrayList)progressBars)[i];
int prev = bar.Value;
if (i == 9)
{
Increment(bar, max);
}
else
{
Increment(bar, prevValue);
}
prevValue = prev;
}
}
Thread.Sleep(50);

loopCount = (!alternate) ? loopCount + 1 : loopCount - 1;
if ((loopCount &lt; 1) || (loopCount &gt; 10))
{
loopCount = (alternate) ? 1 : 10;
alternate = !alternate;
}
max = loopCount;
}
}

private void Increment(ProgressBar progressBar, int max)
{
Delegate resetDelegate = new EventHandler(Reset);
progressBar.Invoke(resetDelegate);
sineForm.Value = max;
Delegate setDelegate = new EventHandler(sineForm.SetValue);
progressBar.Invoke(setDelegate);
}
#endregion
}
}
</pre>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 625px; width: 1px; height: 1px; overflow: hidden;">#region Usings<br />
using System;<br />
using System.Collections;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Text;<br />
using System.Threading;<br />
using System.Windows.Forms;<br />
#endregion</p>
<p>namespace WindowsFormsApplication1<br />
{<br />
class WorkerThread<br />
{<br />
#region Private Variables<br />
private Thread _thread;<br />
public SineForm sineForm { get; set; }<br />
#endregion</p>
<p>#region Properties<br />
public bool IsAlive<br />
{<br />
get<br />
{<br />
return _thread.IsAlive;<br />
}<br />
}<br />
#endregion</p>
<p>#region Constructor<br />
public WorkerThread()<br />
{<br />
_thread = new Thread(Work);<br />
}<br />
#endregion</p>
<p>#region Public Methods<br />
public void Start(object progressBars)<br />
{<br />
_thread.Start(progressBars);<br />
}</p>
<p>public void Stop()<br />
{<br />
_thread.Abort();<br />
}</p>
<p>private void Work(object progressBars)<br />
{<br />
int loopCount = 1;<br />
int max = loopCount;<br />
bool alternate = false;<br />
while (true)<br />
{<br />
// Set defaults<br />
if (loopCount == 1)<br />
{<br />
for (int i = 9; i &gt;= 0; i&#8211;)<br />
{<br />
ProgressBar bar = (ProgressBar)((ArrayList)progressBars)[i];<br />
Increment(bar, max);<br />
max++;<br />
}<br />
}<br />
else<br />
{<br />
int prevValue = 0;<br />
for (int i = 9; i &gt;= 0; i&#8211;)<br />
{<br />
ProgressBar bar = (ProgressBar)((ArrayList)progressBars)[i];<br />
int prev = bar.Value;<br />
if (i == 9)<br />
{<br />
Increment(bar, max);<br />
}<br />
else<br />
{<br />
Increment(bar, prevValue);<br />
}<br />
prevValue = prev;<br />
}<br />
}<br />
Thread.Sleep(50);</p>
<p>loopCount = (!alternate) ? loopCount + 1 : loopCount &#8211; 1;<br />
if ((loopCount &lt; 1) || (loopCount &gt; 10))<br />
{<br />
loopCount = (alternate) ? 1 : 10;<br />
alternate = !alternate;<br />
}<br />
max = loopCount;<br />
}<br />
}</p>
<p>private void Increment(ProgressBar progressBar, int max)<br />
{<br />
Delegate resetDelegate = new EventHandler(Reset);<br />
progressBar.Invoke(resetDelegate);<br />
sineForm.Value = max;<br />
Delegate setDelegate = new EventHandler(sineForm.SetValue);<br />
progressBar.Invoke(setDelegate);<br />
}<br />
#endregion<br />
}<br />
}</p>
</div>
<h4>Incoming search terms:</h4><ul><li><a href="http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-threading-using-an-example/" title="c# progressbar invoke thread">c# progressbar invoke thread</a></li><li><a href="http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-threading-using-an-example/" title="C# threading training">C# threading training</a></li><li><a href="http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-threading-using-an-example/" title="C# threding training">C# threding training</a></li><li><a href="http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-threading-using-an-example/" title="increment integer using threading c# net">increment integer using threading c# net</a></li><li><a href="http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-threading-using-an-example/" title="multithreading c# course chennai">multithreading c# course chennai</a></li><li><a href="http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-threading-using-an-example/" title="training thread in c#">training thread in c#</a></li></ul><p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;counturl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;count=none&amp;text=C%23%20Training%20on%20Threading%20using%20an%20example" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;counturl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;count=none&amp;text=C%23%20Training%20on%20Threading%20using%20an%20example" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a href="javascript:if(document.all){window.external.AddFavorite('http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-threading-using-an-example/','C#%20Training%20on%20Threading%20using%20an%20example')}else{var%20b=a2a_config.localize.BookmarkInstructions%20||%20'Press%20Ctrl+D%20to%20bookmark%20this%20page';alert(a2a_config.localize.BookmarkInstructions)}" title="Bookmark/Favorites" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/bookmark.png" width="16" height="16" alt="Bookmark/Favorites"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;linkname=C%23%20Training%20on%20Threading%20using%20an%20example" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;linkname=C%23%20Training%20on%20Threading%20using%20an%20example" title="Digg" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;linkname=C%23%20Training%20on%20Threading%20using%20an%20example" title="Email" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;linkname=C%23%20Training%20on%20Threading%20using%20an%20example" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a><a class="a2a_button_orkut" href="http://www.addtoany.com/add_to/orkut?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;linkname=C%23%20Training%20on%20Threading%20using%20an%20example" title="Orkut" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/orkut.png" width="16" height="16" alt="Orkut"/></a><a class="a2a_button_posterous" href="http://www.addtoany.com/add_to/posterous?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;linkname=C%23%20Training%20on%20Threading%20using%20an%20example" title="Posterous" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/posterous.png" width="16" height="16" alt="Posterous"/></a><a class="a2a_button_printfriendly" href="http://www.addtoany.com/add_to/printfriendly?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;linkname=C%23%20Training%20on%20Threading%20using%20an%20example" title="PrintFriendly" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/printfriendly.png" width="16" height="16" alt="PrintFriendly"/></a><a class="a2a_button_tumblr" href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;linkname=C%23%20Training%20on%20Threading%20using%20an%20example" title="Tumblr" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;linkname=C%23%20Training%20on%20Threading%20using%20an%20example" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-threading-using-an-example%2F&amp;title=C%23%20Training%20on%20Threading%20using%20an%20example" id="wpa2a_6"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-threading-using-an-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# Training on LINQ &#8211; Filtering employees in a collection</title>
		<link>http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-linq-filtering-employees-in-a-collection/</link>
		<comments>http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-linq-filtering-employees-in-a-collection/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 09:01:59 +0000</pubDate>
		<dc:creator>Felix</dc:creator>
				<category><![CDATA[.NET Simplified]]></category>
		<category><![CDATA[.NET Training]]></category>
		<category><![CDATA[.NET Training Chennai]]></category>
		<category><![CDATA[.NET Training in Chennai]]></category>
		<category><![CDATA[For the love of C# .NET]]></category>
		<category><![CDATA[Filter Employee]]></category>
		<category><![CDATA[System Threading]]></category>
		<category><![CDATA[Training on LINQ]]></category>
		<category><![CDATA[Visual studio 2010]]></category>

		<guid isPermaLink="false">http://blog.wafytech.com/?p=104</guid>
		<description><![CDATA[We taught the students on how to use LINQ in Visual studio 2010 .NET. It was more hands on and the students tried creating the below example application in C# .NET. They were taught the best practices in creating such applications and were able to create the below application using a professional approach. See for]]></description>
			<content:encoded><![CDATA[<p>We taught the students on how to use LINQ in Visual studio 2010 .NET. It was more hands on and the students tried creating the below example application in C# .NET. They were taught the best practices in creating such applications and were able to create the below application using a professional approach. See for yourself the program screenshot and the code created for the same.<br />
<a href="http://blog.wafytech.com/wp-content/uploads/2011/03/FilterEmployee.jpg"><img class="aligncenter size-full wp-image-111" title="FilterEmployee" src="http://blog.wafytech.com/wp-content/uploads/2011/03/FilterEmployee.jpg" alt="" width="343" height="329" /></a></p>
<pre class="brush: csharp; title: ; notranslate">

#region Info
// An example of filtering employees in a collection using LINQ
#endregion

#region Usings
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
#endregion

namespace EMS
{
    public partial class FilterEmployee : Form
    {
        #region Private Variables
        private List&lt;Employee&gt; _employeeList;
        #endregion

        #region Constructor
        public FilterEmployee()
        {
            InitializeComponent();
        }
        #endregion

        #region Private Methods
        private void FilterEmployee_Load(object sender, EventArgs e)
        {
            // Set the default value to StartsWith
            cmbCondition.SelectedIndex = 0;
            // Load default employees list
            LoadDefault();
        }

        private void LoadDefault()
        {
            // Create employees list
            _employeeList = new List&lt;Employee&gt;();

            // Load Employees
            Employee employee = new Employee() { Name = &quot;Max&quot;, DOB = Convert.ToDateTime(&quot;12/12/1966&quot;) };
            _employeeList.Add(employee);
            employee = new Employee() { Name = &quot;Muller&quot;, DOB = Convert.ToDateTime(&quot;1/12/1942&quot;) };
            _employeeList.Add(employee);
            employee = new Employee() { Name = &quot;Roman&quot;, DOB = Convert.ToDateTime(&quot;12/7/1986&quot;) };
            _employeeList.Add(employee);

            // Assign employees list to data grid
            dataGridView.DataSource = _employeeList;
        }

        private void Filter(string name, DateTime from, DateTime to)
        {
            // Logic to filter employees
            IEnumerable&lt;Employee&gt; result;
            switch (cmbCondition.SelectedIndex)
            {
                case 0:
                    // Starts with option has been selected
                    if (txtName.Text.Trim().Length &gt; 0)
                    {
                        result = _employeeList.Where&lt;Employee&gt;(employee =&gt; employee.Name.StartsWith(txtName.Text));
                    }
                    else
                    {
                        result = _employeeList.Where&lt;Employee&gt;(employee =&gt; (employee.Name.StartsWith(txtName.Text) &amp;&amp;
 ((employee.DOB &gt;= dtpFrom.Value) &amp;&amp; (employee.DOB &lt;= dtpTo.Value))));
                    }
                    break;
                case 1:
                    // Contains option has been selected
                    if (txtName.Text.Trim().Length &gt; 0)
                    {
                        result = _employeeList.Where&lt;Employee&gt;(employee =&gt; employee.Name.Contains(txtName.Text));
                    }
                    else
                    {
                        result = _employeeList.Where&lt;Employee&gt;(employee =&gt; (employee.Name.Contains(txtName.Text) &amp;&amp;
 ((employee.DOB &gt;= dtpFrom.Value) &amp;&amp; (employee.DOB &lt;= dtpTo.Value))));
                    }
                    break;
                default:
                    // Ends with option has been selected
                    if (txtName.Text.Trim().Length &gt; 0)
                    {
                        result = _employeeList.Where&lt;Employee&gt;(employee =&gt; employee.Name.EndsWith(txtName.Text));
                    }
                    else
                    {
                        result = _employeeList.Where&lt;Employee&gt;(employee =&gt; (employee.Name.EndsWith(txtName.Text) &amp;&amp;
 ((employee.DOB &gt;= dtpFrom.Value) &amp;&amp; (employee.DOB &lt;= dtpTo.Value))));
                    }
                    break;
            }
            // Do not use the existing collection - create a new collection for the results
            List&lt;Employee&gt; searchResults = new List&lt;Employee&gt;();
            foreach (Employee employee in result)
            {
                searchResults.Add(employee);
            }
            // Assign filtered employees list to data grid
            dataGridView.DataSource = searchResults;
        }

        private void btnSearch_Click(object sender, EventArgs e)
        {
             // Filter existing employees
             Filter(txtName.Text, dtpFrom.Value, dtpTo.Value);
        }

        private void btnDefault_Click(object sender, EventArgs e)
        {
             // Load default values
             LoadDefault();
        }
        #endregion
    }
}
</pre>
<h4>Incoming search terms:</h4><ul><li><a href="http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-linq-filtering-employees-in-a-collection/" title="employee e = new employee in c# net">employee e = new employee in c# net</a></li><li><a href="http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-linq-filtering-employees-in-a-collection/" title="if (txtname text txtname text) in asp net">if (txtname text txtname text) in asp net</a></li></ul><p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;counturl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;count=none&amp;text=C%23%20Training%20on%20LINQ%20%26%238211%3B%20Filtering%20employees%20in%20a%20collection" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;counturl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;count=none&amp;text=C%23%20Training%20on%20LINQ%20%26%238211%3B%20Filtering%20employees%20in%20a%20collection" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a href="javascript:if(document.all){window.external.AddFavorite('http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-linq-filtering-employees-in-a-collection/','C#%20Training%20on%20LINQ%20&#8211;%20Filtering%20employees%20in%20a%20collection')}else{var%20b=a2a_config.localize.BookmarkInstructions%20||%20'Press%20Ctrl+D%20to%20bookmark%20this%20page';alert(a2a_config.localize.BookmarkInstructions)}" title="Bookmark/Favorites" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/bookmark.png" width="16" height="16" alt="Bookmark/Favorites"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;linkname=C%23%20Training%20on%20LINQ%20%26%238211%3B%20Filtering%20employees%20in%20a%20collection" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;linkname=C%23%20Training%20on%20LINQ%20%26%238211%3B%20Filtering%20employees%20in%20a%20collection" title="Digg" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;linkname=C%23%20Training%20on%20LINQ%20%26%238211%3B%20Filtering%20employees%20in%20a%20collection" title="Email" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;linkname=C%23%20Training%20on%20LINQ%20%26%238211%3B%20Filtering%20employees%20in%20a%20collection" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a><a class="a2a_button_orkut" href="http://www.addtoany.com/add_to/orkut?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;linkname=C%23%20Training%20on%20LINQ%20%26%238211%3B%20Filtering%20employees%20in%20a%20collection" title="Orkut" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/orkut.png" width="16" height="16" alt="Orkut"/></a><a class="a2a_button_posterous" href="http://www.addtoany.com/add_to/posterous?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;linkname=C%23%20Training%20on%20LINQ%20%26%238211%3B%20Filtering%20employees%20in%20a%20collection" title="Posterous" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/posterous.png" width="16" height="16" alt="Posterous"/></a><a class="a2a_button_printfriendly" href="http://www.addtoany.com/add_to/printfriendly?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;linkname=C%23%20Training%20on%20LINQ%20%26%238211%3B%20Filtering%20employees%20in%20a%20collection" title="PrintFriendly" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/printfriendly.png" width="16" height="16" alt="PrintFriendly"/></a><a class="a2a_button_tumblr" href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;linkname=C%23%20Training%20on%20LINQ%20%26%238211%3B%20Filtering%20employees%20in%20a%20collection" title="Tumblr" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;linkname=C%23%20Training%20on%20LINQ%20%26%238211%3B%20Filtering%20employees%20in%20a%20collection" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Ffor-the-love-of-c-net%2Fc-training-on-linq-filtering-employees-in-a-collection%2F&amp;title=C%23%20Training%20on%20LINQ%20%26%238211%3B%20Filtering%20employees%20in%20a%20collection" id="wpa2a_8"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wafytech.com/blog/for-the-love-of-c-net/c-training-on-linq-filtering-employees-in-a-collection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is .NET Framework?</title>
		<link>http://www.wafytech.com/blog/net-simplified/what-is-net-framework/</link>
		<comments>http://www.wafytech.com/blog/net-simplified/what-is-net-framework/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 06:37:45 +0000</pubDate>
		<dc:creator>Subha</dc:creator>
				<category><![CDATA[.NET Simplified]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Windows Server 2003]]></category>
		<category><![CDATA[Windows Server 2003 R2]]></category>

		<guid isPermaLink="false">http://blog.wafytech.com/?p=31</guid>
		<description><![CDATA[.Net Framework is a Programming Infrastructure created by Microsoft for developing, managing, deploying and running .NET applications and services. It uses Visual Studio 2010 as the development tool to build applications. .NET Framework is Device Independent and Platform Independent environment that works across environment barriers and this is the biggest advantage of using .NET Framework.]]></description>
			<content:encoded><![CDATA[<p>.Net Framework is a Programming Infrastructure created by Microsoft for developing, managing, deploying and running .NET applications and services. It uses Visual Studio 2010 as the development tool to build applications.</p>
<p>.NET Framework is Device Independent and Platform Independent  environment that works across environment barriers and this is the  biggest advantage of using .NET Framework. The Framework can be run on Servers and Clients. The first .NET Framework was released in 2000 and the current .NET Framework 4 is the 6th release. The .NET versions 1.1, 2.0, 3.0 and 3.5 was included as a default installation package with windows versions Windows Server 2003, Windows Server 2003 R2, Windows Vista/ Windows Server 2008 and with Windows 7/ Windows Server 2008 R2.</p>
<p>.NET Framework includes the following main components:</p>
<p>1. CLR &#8211; Common Language Runtime.</p>
<p>2. .NET Framework class library.</p>
<p>3. Development Frameworks.</p>
<p>Have a watch on this space. More to follow soon.</p>
<p>- Subha Narayanan, PMP</p>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;counturl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;count=none&amp;text=What%20is%20.NET%20Framework%3F" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;counturl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;count=none&amp;text=What%20is%20.NET%20Framework%3F" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a href="javascript:if(document.all){window.external.AddFavorite('http://www.wafytech.com/blog/net-simplified/what-is-net-framework/','What%20is%20.NET%20Framework?')}else{var%20b=a2a_config.localize.BookmarkInstructions%20||%20'Press%20Ctrl+D%20to%20bookmark%20this%20page';alert(a2a_config.localize.BookmarkInstructions)}" title="Bookmark/Favorites" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/bookmark.png" width="16" height="16" alt="Bookmark/Favorites"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;linkname=What%20is%20.NET%20Framework%3F" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;linkname=What%20is%20.NET%20Framework%3F" title="Digg" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;linkname=What%20is%20.NET%20Framework%3F" title="Email" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;linkname=What%20is%20.NET%20Framework%3F" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a><a class="a2a_button_orkut" href="http://www.addtoany.com/add_to/orkut?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;linkname=What%20is%20.NET%20Framework%3F" title="Orkut" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/orkut.png" width="16" height="16" alt="Orkut"/></a><a class="a2a_button_posterous" href="http://www.addtoany.com/add_to/posterous?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;linkname=What%20is%20.NET%20Framework%3F" title="Posterous" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/posterous.png" width="16" height="16" alt="Posterous"/></a><a class="a2a_button_printfriendly" href="http://www.addtoany.com/add_to/printfriendly?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;linkname=What%20is%20.NET%20Framework%3F" title="PrintFriendly" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/printfriendly.png" width="16" height="16" alt="PrintFriendly"/></a><a class="a2a_button_tumblr" href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;linkname=What%20is%20.NET%20Framework%3F" title="Tumblr" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;linkname=What%20is%20.NET%20Framework%3F" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.wafytech.com%2Fblog%2Fnet-simplified%2Fwhat-is-net-framework%2F&amp;title=What%20is%20.NET%20Framework%3F" id="wpa2a_10"><img src="http://www.wafytech.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wafytech.com/blog/net-simplified/what-is-net-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

