<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Technology Weblog</title>
	<atom:link href="http://mytechcorner.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mytechcorner.wordpress.com</link>
	<description></description>
	<lastBuildDate>Tue, 17 Jun 2008 09:46:36 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='mytechcorner.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/dd1b5cf8f2de077d9ab17c3451be10aa?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Technology Weblog</title>
		<link>http://mytechcorner.wordpress.com</link>
	</image>
			<item>
		<title>Windows Embedded NavReady 2009 OS</title>
		<link>http://mytechcorner.wordpress.com/2008/06/17/windows-embedded-navready-2009-os/</link>
		<comments>http://mytechcorner.wordpress.com/2008/06/17/windows-embedded-navready-2009-os/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 09:45:46 +0000</pubDate>
		<dc:creator>mytechspace</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[OS]]></category>

		<guid isPermaLink="false">http://mytechcorner.wordpress.com/?p=11</guid>
		<description><![CDATA[Microsoft launches its first Embedded Operating System Specifically for Portable Navigation Device (PND) Manufacturers.
http://www.microsoft.com/Presspass/press/2008/jun08/06-16WENavReadyPR.mspx?rss_fdn=Press%20Releases
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mytechcorner.wordpress.com&blog=3565951&post=11&subd=mytechcorner&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Microsoft launches its first Embedded Operating System Specifically for Portable Navigation Device (PND) Manufacturers.</p>
<p><a href="http://www.microsoft.com/Presspass/press/2008/jun08/06-16WENavReadyPR.mspx?rss_fdn=Press%20Releases">http://www.microsoft.com/Presspass/press/2008/jun08/06-16WENavReadyPR.mspx?rss_fdn=Press%20Releases</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mytechcorner.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mytechcorner.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mytechcorner.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mytechcorner.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mytechcorner.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mytechcorner.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mytechcorner.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mytechcorner.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mytechcorner.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mytechcorner.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mytechcorner.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mytechcorner.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mytechcorner.wordpress.com&blog=3565951&post=11&subd=mytechcorner&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mytechcorner.wordpress.com/2008/06/17/windows-embedded-navready-2009-os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50002e541f5c12f6099664e644d57f14?s=96&#38;d=identicon" medium="image">
			<media:title type="html">mytechspace</media:title>
		</media:content>
	</item>
		<item>
		<title>Sending e-mail using smtp mail(VB.Net)</title>
		<link>http://mytechcorner.wordpress.com/2008/05/02/sending-e-mail-using-smtp-mailvbnet/</link>
		<comments>http://mytechcorner.wordpress.com/2008/05/02/sending-e-mail-using-smtp-mailvbnet/#comments</comments>
		<pubDate>Fri, 02 May 2008 04:23:04 +0000</pubDate>
		<dc:creator>mytechspace</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mytechcorner.wordpress.com/?p=9</guid>
		<description><![CDATA[ 
In Dotnet, System.Net.Mail namespace provides the classes for sending e-mails. The code given below is the sample.
Imports System
Imports System.Net.Mail
Public Class Form1
Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click
Try
Dim objMailMsg As MailMessage = New MailMessage(txtFrom.Text, txtTo.Text)
objMailMsg.Subject = txtSubject.Text
objMailMsg.Body = txtBody.Text
objMailMsg.Priority = MailPriority.High
objMailMsg.IsBodyHtml = True
Dim objSMTPClient As Net.Mail.SmtpClient = New Net.Mail.SmtpClient()
objSMTPClient.Host = &#8220;your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mytechcorner.wordpress.com&blog=3565951&post=9&subd=mytechcorner&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p> </p>
<p>In Dotnet, System.Net.Mail namespace provides the classes for sending e-mails. The code given below is the sample.<br />
Imports System<br />
Imports System.Net.Mail<br />
Public Class Form1<br />
Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click</p>
<p>Try</p>
<p>Dim objMailMsg As MailMessage = New MailMessage(txtFrom.Text, txtTo.Text)</p>
<p>objMailMsg.Subject = txtSubject.Text<br />
objMailMsg.Body = txtBody.Text<br />
objMailMsg.Priority = MailPriority.High<br />
objMailMsg.IsBodyHtml = True</p>
<p>Dim objSMTPClient As Net.Mail.SmtpClient = New Net.Mail.SmtpClient()</p>
<p>objSMTPClient.Host = &#8220;your host address&#8221;<br />
objSMTPClient.Send(objMailMsg)</p>
<p>Catch ex As Exception<br />
Throw ex<br />
End Try</p>
<p>End Sub</p>
<p>Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click<br />
txtBody.Clear()<br />
txtFrom.Clear()<br />
txtTo.Clear()<br />
txtSubject.Clear()<br />
End Sub</p>
<p>End Class</p>
<p> For the above code to work, Create a new VB.Net windows application project, and design a form with <em>From</em>, <em>To, Subject, Body</em> fields And <em>Send, Clear</em>  Buttons.</p>
<p>Most importantly, Dont forget to add the <strong>System.Web.dll</strong> reference (right click on project -&gt; Add Reference -&gt; Browse for the System.Web.dll reference.</p>
<p>Happy Working. See you later&#8230;</p>
<p>Till then,</p>
<p>Priya.</p>
<p> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mytechcorner.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mytechcorner.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mytechcorner.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mytechcorner.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mytechcorner.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mytechcorner.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mytechcorner.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mytechcorner.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mytechcorner.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mytechcorner.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mytechcorner.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mytechcorner.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mytechcorner.wordpress.com&blog=3565951&post=9&subd=mytechcorner&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mytechcorner.wordpress.com/2008/05/02/sending-e-mail-using-smtp-mailvbnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50002e541f5c12f6099664e644d57f14?s=96&#38;d=identicon" medium="image">
			<media:title type="html">mytechspace</media:title>
		</media:content>
	</item>
		<item>
		<title>Sending E-mail through Outlook using VB.net</title>
		<link>http://mytechcorner.wordpress.com/2008/04/30/sending-e-mail-through-outlook-using-vbnet/</link>
		<comments>http://mytechcorner.wordpress.com/2008/04/30/sending-e-mail-through-outlook-using-vbnet/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 09:03:46 +0000</pubDate>
		<dc:creator>mytechspace</dc:creator>
				<category><![CDATA[Outlook]]></category>
		<category><![CDATA[VB.Net]]></category>
		<category><![CDATA[e-mail]]></category>

		<guid isPermaLink="false">http://mytechcorner.wordpress.com/?p=8</guid>
		<description><![CDATA[ 
This example shows how to add e-mail to Microsoft Outlook outbox using VB.Net .The most improtant point here to get this working is to add a reference to &#8220;Microsoft Outlook object library&#8221;, In case of Microsoft Outlook 2002, Add &#8220;Microsoft Outlook 9.0 object library&#8221; (Right click on the project -&#62; Add References -&#62; Select the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mytechcorner.wordpress.com&blog=3565951&post=8&subd=mytechcorner&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p> </p>
<p>This example shows how to add e-mail to Microsoft Outlook outbox using VB.Net .The most improtant point here to get this working is to add a reference to &#8220;Microsoft Outlook object library&#8221;, In case of Microsoft Outlook 2002, Add &#8220;Microsoft Outlook 9.0 object library&#8221; (Right click on the project -&gt; Add References -&gt; Select the COM tab -&gt; Select &#8220;Microsoft Outlook 9.0 object library&#8221;.</p>
<p> </p>
<p>Public Class Form1</p>
<p>Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click</p>
<p>If (txtTo.Text.Length &gt; 0 And txtSubject.Text.Length &gt; 0 And txtBody.Text.Length &gt; 0) Then</p>
<p>Try</p>
<p>Dim ol As New Outlook.Application()<br />
Dim ns As Outlook.NameSpace<br />
Dim fdMail As Outlook.MAPIFolder</p>
<p>ns = ol.GetNamespace(&#8220;MAPI&#8221;)<br />
ns.Logon(, , True, True)</p>
<p>&#8216;creating a new MailItem object<br />
Dim newMail As Outlook.MailItem</p>
<p>&#8216;gets defaultfolder for my Outlook Outbox<br />
fdMail = ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderOutbox)</p>
<p>&#8216;assign values to the newMail MailItem<br />
newMail = fdMail.Items.Add(Outlook.OlItemType.olMailItem)<br />
newMail.Subject = txtSubject.Text<br />
newMail.Body = txtBody.Text<br />
newMail.To = txtTo.Text<br />
newMail.SaveSentMessageFolder = fdMail</p>
<p>newMail.Send()</p>
<p>Catch ex As Exception</p>
<p>Throw ex</p>
<p>End Try</p>
<p>End If</p>
<p>End Sub</p>
<p>End Class</p>
<p> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mytechcorner.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mytechcorner.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mytechcorner.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mytechcorner.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mytechcorner.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mytechcorner.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mytechcorner.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mytechcorner.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mytechcorner.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mytechcorner.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mytechcorner.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mytechcorner.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mytechcorner.wordpress.com&blog=3565951&post=8&subd=mytechcorner&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mytechcorner.wordpress.com/2008/04/30/sending-e-mail-through-outlook-using-vbnet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50002e541f5c12f6099664e644d57f14?s=96&#38;d=identicon" medium="image">
			<media:title type="html">mytechspace</media:title>
		</media:content>
	</item>
		<item>
		<title>Example : C# 3.0 new features</title>
		<link>http://mytechcorner.wordpress.com/2008/04/24/example-c-30-new-features/</link>
		<comments>http://mytechcorner.wordpress.com/2008/04/24/example-c-30-new-features/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 09:11:28 +0000</pubDate>
		<dc:creator>mytechspace</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mytechcorner.wordpress.com/?p=6</guid>
		<description><![CDATA[ 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;namespace Example.cSharp3Dot0
{
class Program
{
static void Main(string[] args)
{
List Languages = new List { &#8220;C#&#8221;, &#8220;VB&#8221;, &#8220;VC++&#8221; }; // &#8212;-&#62; Collection Initializer
var languageQuery = //&#8212;-&#62; Implicitly typed local variables
from one in Languages
where one == &#8220;VC++&#8221;
select new { one }; //&#8212;-&#62; Anonymous types.
foreach (var name in languageQuery)
{
Console.WriteLine(&#8220;Its&#8221; + name.one);
Console.WriteLine(&#8220;Its&#8221; + name.one.ToString().getFirstTwoCharacters());
Console.ReadLine();
}
}
}
public static class myClass
{
public [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mytechcorner.wordpress.com&blog=3565951&post=6&subd=mytechcorner&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p> </p>
<p>using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Text;<br />
using System.Xml;namespace Example.cSharp3Dot0<br />
{<br />
class Program<br />
{</p>
<p>static void Main(string[] args)<br />
{<br />
List Languages = new List { &#8220;C#&#8221;, &#8220;VB&#8221;, &#8220;VC++&#8221; }; // &#8212;-&gt; Collection Initializer</p>
<p>var languageQuery = //&#8212;-&gt; Implicitly typed local variables<br />
from one in Languages<br />
where one == &#8220;VC++&#8221;<br />
select new { one }; //&#8212;-&gt; Anonymous types.<br />
foreach (var name in languageQuery)<br />
{<br />
Console.WriteLine(&#8220;Its&#8221; + name.one);<br />
Console.WriteLine(&#8220;Its&#8221; + name.one.ToString().getFirstTwoCharacters());<br />
Console.ReadLine();<br />
}<br />
}<br />
}</p>
<p>public static class myClass<br />
{<br />
public static string getFirstTwoCharacters(this System.String st) // &#8212;-&gt; Extension methods<br />
{<br />
return st.Substring(0, 2);<br />
}</p>
<p>}<br />
}</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mytechcorner.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mytechcorner.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mytechcorner.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mytechcorner.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mytechcorner.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mytechcorner.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mytechcorner.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mytechcorner.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mytechcorner.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mytechcorner.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mytechcorner.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mytechcorner.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mytechcorner.wordpress.com&blog=3565951&post=6&subd=mytechcorner&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mytechcorner.wordpress.com/2008/04/24/example-c-30-new-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50002e541f5c12f6099664e644d57f14?s=96&#38;d=identicon" medium="image">
			<media:title type="html">mytechspace</media:title>
		</media:content>
	</item>
		<item>
		<title>C# 3.0 : New Features</title>
		<link>http://mytechcorner.wordpress.com/2008/04/24/c-30-new-features/</link>
		<comments>http://mytechcorner.wordpress.com/2008/04/24/c-30-new-features/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 04:02:30 +0000</pubDate>
		<dc:creator>mytechspace</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Dotnet]]></category>
		<category><![CDATA[VS2008]]></category>

		<guid isPermaLink="false">http://mytechcorner.wordpress.com/?p=3</guid>
		<description><![CDATA[Implicitly Typed Local Variables
“Var” allows declaring a new variable of type var, whose type is implicitly inferred from the expression used to initialize the variable. Local variables can be declared as type var, Compiler does actually determine the actual type based on the data it is initialized.
It must be initialized in the same statement. The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mytechcorner.wordpress.com&blog=3565951&post=3&subd=mytechcorner&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h2>Implicitly Typed Local Variables</h2>
<p><span style="font-size:small;"><strong><span style="color:#000000;font-family:Arial;">“Var”</span></strong><span style="color:#000000;font-family:Arial;"> allows declaring a new variable of type <em><strong><span style="font-family:Arial;">var</span></strong></em>, whose type is implicitly inferred from the expression used to initialize the variable. Local variables can be declared as type <em><strong><span style="font-family:Arial;">var, </span></strong></em>Compiler does actually determine the actual type based on the data it is initialized.</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="color:#000000;font-family:Arial;"><span style="font-size:small;">It <strong><span style="font-family:Arial;">must</span></strong> be initialized in the same statement. The value that the variable is being initialized to determines the type of the variable.</span></span></p>
<p class="MsoNormal" style="padding-left:30px;"><span style="color:#000000;font-family:Arial;"><span style="font-size:small;">var a = 3; &#8211;&gt; a is created of type int</span></span></p>
<p class="MsoNormal" style="padding-left:30px;"><span style="color:#000000;font-family:Arial;"><span style="font-size:small;">var str = “Priya” &#8211;&gt; str is created of type string.</span></span></p>
<p class="MsoNormal" style="padding-left:30px;"><span style="color:#000000;font-family:Arial;"><span style="font-size:small;">var a; (Gives error)  </span></span></p>
<p class="MsoNormal" style="text-indent:-0.25in;margin:0 0 0 42pt;"><span style="font-size:10pt;color:#000000;font-family:Symbol;"><span style="font:7pt;"> </span></span><span style="font-size:small;"><span style="color:#000000;font-family:Arial;">Usage of </span><span style="color:#0000ff;font-family:Arial;">var  <span style="color:#000000;">&#8211;&gt;</span> </span><span style="color:#000000;font-family:Arial;">Used to store anonymous types as in LINQ based programming.</span></span><span style="font-size:small;"><span style="color:#000000;font-family:Arial;">   </span></span></p>
<p class="MsoNormal" style="padding-left:30px;"><span style="font-size:small;"><span style="color:#0000ff;font-family:Arial;">var</span><span style="color:#000000;font-family:Arial;"> <span style="font-size:10pt;">languageQuery </span>= </span><span style="color:#0000ff;font-family:Arial;">from</span><span style="color:#000000;font-family:Arial;"> one </span><span style="color:#0000ff;font-family:Arial;">in</span><span style="color:#000000;font-family:Arial;"> <span style="font-size:10pt;">Languages </span></span><span style="color:#0000ff;font-family:Arial;">where</span><span style="color:#000000;font-family:Arial;"> one == </span><span style="color:#a31515;font-family:Arial;">&#8220;VC++&#8221;</span><span style="color:#000000;font-family:Arial;"> </span><span style="color:#0000ff;font-family:Arial;">select</span><span style="color:#000000;font-family:Arial;"> </span><span style="color:#0000ff;font-family:Arial;">new</span><span style="color:#000000;font-family:Arial;"> { one };</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="color:#000000;font-family:Arial;"><span style="font-size:small;">The part “new { one }” declares and instantiates an anonymous type.  Additionally the query probably returns a collection of that anonymous type. </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="color:#000000;font-family:Arial;"><span style="font-size:small;">Implicitly typed arrays, on the other hand, are possible using a different syntax, as shown below:</span></span><span style="color:#000000;font-family:Arial;"><span style="font-size:small;">     </span></span></p>
<p class="MsoNormal"><span style="color:#000000;font-family:Arial;"><span style="font-size:small;">        var strArr = new[] {C, C++, C#}</span></span></p>
<p class="MsoNormal"><span style="color:#000000;font-family:Arial;"><span style="font-size:small;">The above line of code would end up declaring strArr as string[], w</span></span><span style="color:#000000;font-family:Arial;"><span style="font-size:small;">e always know the type of the variable by looking at its declaration. They c</span></span><span style="color:#000000;font-family:Arial;"><span style="font-size:small;">annot be initialized to null and </span></span><span style="color:#000000;font-family:Arial;"><span style="font-size:small;">Cannot be used as Class members.</span></span></p>
<h2 class="NormalWeb1" style="margin:0 0 9pt;">Anonymous Types</h2>
<p class="NormalWeb1" style="margin:0 0 9pt;"><span style="font-family:Arial;"><span style="font-size:small;">C# 3.0 gives the flexibility to create an instance of a class without having to write code for the class before hand as shown below. </span></span></p>
<p class="NormalWeb1" style="padding-left:30px;"><span style="font-size:small;"><span style="color:#000000;font-family:Arial;">new {nationality=&#8221;Indian&#8221;, </span><span style="font-family:Arial;">hair <span style="color:#000000;">=&#8221;Brown&#8221;, age=24</span></span></span></p>
<p class="NormalWeb1"><span style="font-size:small;"><span style="color:windowtext;font-family:Arial;">The above line of code, gives a new type that has three properties: nationality, skin, and age. Internally, the C# compiler would create a class that looks as follows, </span><span style="font-family:Arial;">but it’s not accessible by application code.</span></span></p>
<p class="NormalWeb1" style="padding-left:30px;">class __Anonymous<br />
{<br />
private string _nationality = &#8220;Indian&#8221;;<br />
private string _skin = &#8221; White&#8221;;<br />
private int _age = 24;<br />
public string nationality {get { return _ nationality; } set { _ nationality = value;}}<br />
public string hair {get { return _ hair; } set { _ hair = value; }}<br />
public int age {get { return _ age; } set { _ age = value; }}<br />
}</p>
<p><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;">I<span style="font-size:small;"><span style="color:windowtext;font-family:Arial;">f another anonymous type, with the same sequence of names and types were created, then the compiler would create only a single anonymous type for both instances to use. Also, because the instances are, as you may have guessed, simply instances of the same class, they can be exchanged because the types are really the same. </span></span></span></span></span> </p>
<div class="NormalWeb1"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-size:small;">Now that we have a class, but still need something to hold an instance of the above class. This is where the &#8220;var&#8221; keyword comes in handy; it lets us hold a statically typed instance of the above instance of the anonymous type. Here is a rather simple and easy use of an anonymous type.</span></span> </span></span></span></div>
<p> <span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-size:small;">var priya = new {nationality=&#8221;black&#8221;, hair=&#8221;<span style="color:#000000;"> Brown</span>&#8220;, age=24}</span></span></span></span></span></p>
<p> </p>
<div><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-size:small;">Anonymous types are of class types which can have only public read-only properties as their members. No other class members like methods are allowed. </span></span> </span></span></span></div>
<div></div>
<div><span style="font-family:Arial;"></span></div>
<div><span style="font-family:Arial;"><span style="font-family:Arial;"></span></span></div>
<p><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"></p>
<p class="MsoNormal"><span style="font-size:small;"><span style="font-family:Arial;">They are of</span><span style="color:windowtext;font-family:Arial;"> referrence types</span><span style="font-family:Arial;"> and are derived from ‘Object’ class. i.e. Anonymous types are automatically inferred and created from object initializers(An object initializer specifies values from one or more properties of an object. Which means one can specify a set of properties of an object through a series of assignments, such as {nationality=&#8221;Indian&#8221;, </span><span style="color:windowtext;font-family:Arial;">hair </span><span style="font-family:Arial;">=&#8221;Brown&#8221;, age=24}, and an object is assigned these properties)</span></span></p>
<p class="MsoNormal"><span style="font-family:Arial;"><span style="font-size:small;">They have a method scope.</span></span></p>
<p class="MsoNormal" style="padding-left:30px;">// example.cs</p>
<p style="padding-left:30px;">using System;<br />
using System.Linq;<br />
using System.Text;</p>
<p style="padding-left:30px;">namespace AnonymousTypes<br />
{<br />
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
var priya = new {Nationality = &#8220;Indian&#8221;, Hair = &#8220;Brown&#8221;, Age = 24 };<br />
Console.WriteLine(&#8220;Nationality = {0}\nHair = {1}\nAge = {2}&#8221;, priya. Nationality, priya. Hair, priya.Age);</p>
<p style="padding-left:30px;">Console.ReadLine();<br />
}<br />
}<br />
}</p>
<p><span id="more-3"></span></p>
<div><span style="font-family:Arial;"> </span></div>
<div></div>
<p><span style="font-family:Arial;"></p>
<div><span style="font-family:Arial;"> </span></div>
<div></div>
<p></span></span><span style="font-family:Arial;"></p>
<div><span style="font-family:Arial;"> </span></div>
<div><span style="font-family:Arial;"> </span></div>
<p></span></span><span style="font-family:Arial;"> </p>
<p></span></span></p>
<p> </p>
<h2>Object &amp; Collection Initializers </h2>
<p> Allow assigning values to any accessible members or properties of a type at the time of initiation without invoking the constructor with parameters. This enables you to combine declaration and initialization in one step. public class coordinates<br />
{<br />
public int x;<br />
public int y;<br />
}</p>
<p>We can now go ahead and Declare &amp; initialize a coordinates object using an object initializer, as shown below.</p>
<p>var mycoordinates = new coordinates { x=0; y=0 };</p>
<p>Also, we can easily give values to collections in a rather concise and compact manner in C# 3.0. For instance, the following C# 2.0 code:</p>
<p>List Flowers = new List();Flowers.Add(&#8220;Rose&#8221;);<br />
Flowers.Add(&#8220;Sunflower&#8221;);<br />
Flowers.Add(&#8220;Tulip&#8221;);<br />
Flowers.Add(&#8220;Orchid&#8221;);</p>
<p>Now we can do it as</p>
<p>List Flowers = new List { &#8220;Rose&#8221;, &#8220;Sunflower&#8221;, &#8220;Tulip&#8221;, &#8220;Orchid&#8221; };</p>
<p>The default constructor gets executed before assigning the values.</p>
<p>Used in LINQ query expressions along with anonymous types.</p>
<p>Collection Initializers use Object Initializers to specify multiple elements of collection without calling Add method multiple times.</p>
<p><span><span><span><span><span><span><span><span><span>Extension Methods</span></span></span></span></span></span></span></span></span></p>
<p class="MsoNormal" style="color:black;margin:0;">Extension methods enable you to extend the existing types with additional static methods. Extension methods can be declared only in static classes and are identified by the keyword &#8220;this&#8221; as a modifier on the first parameter of the method. The following is an example of a valid extension method.</p>
<p> </p>
<p>public static string getFirstTwoCharacters(this System.String st)<br />
{<br />
return st.Substring(0, 2);<br />
}</p>
<p>Allows adding new methods to existing types without modifying the existing type. They are special kinds of static methods but are called as if they are instance methods.</p>
<p>The first parameter passed to Extension methods specifies to which type they operate on preceded by ‘this&#8217; keyword.<br />
From within the extension method, you can&#8217;t access the private variables of the type you are extending.<br />
Instance methods take precedence over extension methods in situations where they have same signature.</p>
<h2>Lambda Expressions</h2>
<div><span><span><span><span><span><span><span><span><span> Lambda expressions are extension of anonymous methods introduced in C# 2.0. It enables you to declare your method code inline instead of with a delegate function. </span></span></span></span></span></span></span></span></span></div>
<p>It&#8217;s an inline expression or statement block which can be used to pass arguments to method call or assign value to delegate.</p>
<p>All lambda expression use lambda operator =&gt; where the left side denotes result and right contains statement block or expression.</p>
<p>Let&#8217;s have a look at the following code.</p>
<p>class Demo<br />
{<br />
delegate void DelegateDemo();<br />
static void Main(string[] args)<br />
{<br />
DelegateDemo myDelegate = new DelegateDemo(name);<br />
myDelegate();<br />
}<br />
void name()<br />
{<br />
Console.Writeline(&#8220;Clara&#8221;) ;<br />
}<br />
}</p>
<p>In the above code, C# 1.x allowed you to write code blocks in methods, which can be invoked easily using delegates.</p>
<p>Now, Lets have a look at the same code using anonymous methods introduced in C# 2.0.</p>
<p>class Demo<br />
{<br />
delegate void DelegateDemo();<br />
static void Main(string[] args)<br />
{<br />
DelegateDemo myDelegate = delegate()<br />
{<br />
Console.Writeline(&#8220;Clara&#8221;);<br />
};<br />
myDelegate();<br />
}<br />
}</p>
<p>After the delegate() is an anonymous method. Simpler compared to method based delegate invocation.</p>
<p>Now, Coming to Lambda expressions, it allows us to write anonymous methods in a more concise way as shown below. Lambda expression is written as a parameter list, followed by the =&gt; token, followed by an expression or statement block.</p>
<p>Rewriting the above code using Lambda expressions</p>
<p>class Demo<br />
{<br />
delegate void DelegateDemo();<br />
static void Main(string[] args)<br />
{<br />
DelegateDemo myDelegate = () =&gt; Console.WriteLine(&#8220;Hiya!!&#8221;) ;<br />
myDelegate();<br />
}<br />
}</p>
<h2>Auto Implemented Properties</h2>
<p>It simplifies the property declaration in cases where there is no custom logic required in accessors methods. </p>
<p>E.g. public int Price {get; set;};</p>
<p>Internally compiler creates an anonymous field for assigning values.</p>
<p>When a class is created, most of the times it is used only as a placeholder with getters and setters for holding property values without any additional logic.</p>
<p>Consider the following example.</p>
<p>public class Person<br />
{<br />
int id;<br />
string firstName;<br />
string lastName;</p>
<p>public int ID<br />
{<br />
get { return id; }<br />
set { id = value; }<br />
}<br />
public string FirstName<br />
{<br />
get { return firstName; }<br />
set { firstName = value; }<br />
}<br />
public string LastName<br />
{<br />
get { return lastName; }<br />
set { lastName = value; }<br />
}<br />
public string FullName<br />
{<br />
get { return FirstName + &#8221; &#8221; + LastName; }<br />
}<br />
}</p>
<p>From the above class declaration, it doesn&#8217;t contain any additional logic. The get and set properties are repetitive and they simply set or get the values of the properties without adding any value.</p>
<p>Now, coming to the Auto-Implemented properties, we can rewrite the above code as shown below.</p>
<p>public class Person<br />
{<br />
public int ID { get; set; }<br />
public string FirstName { get; set; }<br />
public string LastName { get; set; }<br />
public string FullName<br />
{<br />
get<br />
{<br />
return FirstName + &#8221; &#8221; + LastName;<br />
}<br />
private set {;}<br />
}<br />
}</p>
<p>In the above code, when you declare a property, the compiler automatically creates a private, anonymous field that is available only to the property&#8217;s get and set accessors.</p>
<p>The auto implemented properties must declare both a get and set accessors.</p>
<p>If you need to create a read-only property, modify the scope of the set accessor to be private.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mytechcorner.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mytechcorner.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mytechcorner.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mytechcorner.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mytechcorner.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mytechcorner.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mytechcorner.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mytechcorner.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mytechcorner.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mytechcorner.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mytechcorner.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mytechcorner.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mytechcorner.wordpress.com&blog=3565951&post=3&subd=mytechcorner&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mytechcorner.wordpress.com/2008/04/24/c-30-new-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50002e541f5c12f6099664e644d57f14?s=96&#38;d=identicon" medium="image">
			<media:title type="html">mytechspace</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello!</title>
		<link>http://mytechcorner.wordpress.com/2008/04/24/hello-world/</link>
		<comments>http://mytechcorner.wordpress.com/2008/04/24/hello-world/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 03:41:51 +0000</pubDate>
		<dc:creator>mytechspace</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hello,
Welcome to my techspace. 
I intend to update this blog on daily basis.  Here I am gonna blog all my ideas, experiences and problems. Feel free to ponder your thoughts on the same.
Thanks,
 
 
 
 
 
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mytechcorner.wordpress.com&blog=3565951&post=1&subd=mytechcorner&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><span style="color:#000000;"><span style="font-size:small;"><span style="font-family:Times New Roman;"><span style="color:black;font-family:Arial;">Hello,</span></p>
<p><span style="color:black;font-family:Arial;">Welcome to my techspace. </span></p>
<p><span style="color:black;font-family:Arial;">I intend to update this blog on daily basis.<span>  </span>Here I am gonna blog all my ideas, experiences and problems. Feel free to ponder your thoughts on the same.</span></p>
<p><span style="color:black;font-family:Arial;">Thanks,</span></p>
<p><font color="#000000"></font><font size="3"></font><font face="Times New Roman"> </p>
<p></font></span><font color="#000000"></font><font size="3"> </p>
<p></font></span><font color="#000000"> </p>
<p></font></span> </p>
<p> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mytechcorner.wordpress.com/1/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mytechcorner.wordpress.com/1/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mytechcorner.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mytechcorner.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mytechcorner.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mytechcorner.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mytechcorner.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mytechcorner.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mytechcorner.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mytechcorner.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mytechcorner.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mytechcorner.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mytechcorner.wordpress.com&blog=3565951&post=1&subd=mytechcorner&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mytechcorner.wordpress.com/2008/04/24/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/50002e541f5c12f6099664e644d57f14?s=96&#38;d=identicon" medium="image">
			<media:title type="html">mytechspace</media:title>
		</media:content>
	</item>
	</channel>
</rss>