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

<channel>
	<title>Jyotsna Kalambe's Blog</title>
	<atom:link href="http://jyotsnakalambe.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jyotsnakalambe.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Fri, 04 Dec 2009 10:40:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jyotsnakalambe.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/db5cd826519ae4cef8e97f91e2cdf3e1?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Jyotsna Kalambe's Blog</title>
		<link>http://jyotsnakalambe.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jyotsnakalambe.wordpress.com/osd.xml" title="Jyotsna Kalambe&#039;s Blog" />
	<atom:link rel='hub' href='http://jyotsnakalambe.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Let’s Learn Remoting in .NET 3.5</title>
		<link>http://jyotsnakalambe.wordpress.com/2009/12/04/let%e2%80%99s-learn-remoting-in-net-3-5/</link>
		<comments>http://jyotsnakalambe.wordpress.com/2009/12/04/let%e2%80%99s-learn-remoting-in-net-3-5/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 09:56:22 +0000</pubDate>
		<dc:creator>jyotsnakalambe</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[C#.NET]]></category>

		<guid isPermaLink="false">http://jyotsnakalambe.wordpress.com/?p=254</guid>
		<description><![CDATA[Remoting is very important part of WCF (Windows Communication Foundation) Here we are going to write code for retrieving remote machine process details. First we need create a class i.e. .dll where we will write the functionality of the project. Secondly we will create a Windows project as Server. And finally we will create a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=254&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Remoting is very important part of WCF (Windows Communication Foundation)</p>
<p>Here we are going to write code for retrieving remote machine process details.</p>
<ol>
<li>First we need create a <strong>class</strong> i.e. .dll where we will write the functionality of the project.</li>
<li>Secondly we will create a Windows project as <strong>Server.<br />
</strong></li>
<li>And finally we will create a Windows project as <strong>Client.</strong></li>
</ol>
<p><span style="color:#ff0000;"><strong>Step 1:</strong></span></p>
<p>Create project New Class Library Project which will create .dll file.</p>
<p><strong><a href="http://jyotsnakalambe.files.wordpress.com/2009/12/r1.jpg"><img class="aligncenter size-full wp-image-253" title="r1" src="http://jyotsnakalambe.files.wordpress.com/2009/12/r1.jpg?w=467&#038;h=286" alt="" width="467" height="286" /></a></strong></p>
<p>Add below code.</p>
<pre><span style="color:#ff9900;">using System;
</span><span style="color:#ff9900;">using System.Collections.Generic;
</span><span style="color:#ff9900;">using System.Text;
</span><span style="color:#ff9900;">using System.Data ;
using Microsoft.Win32;</span>
<span style="color:#ff9900;">namespace RemoteClass</span>
<span style="color:#00ccff;"> </span><span style="color:#ff9900;">{</span>
<span style="color:#ff9900;">public class Remote:MarshalByRefObject {</span>
<span style="color:#ff9900;">  public DataTable Remoteprocesses()</span>
<span style="color:#ff9900;">        {</span>
<span style="color:#ff9900;">            DataTable ProcessTable = new DataTable();</span>
<span style="color:#ff9900;">            ProcessTable.Columns.Add("processno");</span>
<span style="color:#ff9900;">            ProcessTable.Columns.Add("ProcessId");</span>
<span style="color:#ff9900;">            ProcessTable.Columns.Add("ProcessName");</span>
<span style="color:#ff9900;">            int i = 1;</span>
<span style="color:#ff9900;">            foreach (System.Diagnostics.Process winProc in
            System.Diagnostics.Process.GetProcesses())
            {</span>
<span style="color:#ff9900;">                DataRow myNewRow;</span>
<span style="color:#ff9900;">                myNewRow = ProcessTable.NewRow();</span>
<span style="color:#ff9900;">                myNewRow["processno"] = i;</span>
<span style="color:#ff9900;">                myNewRow["ProcessId"] = winProc.Id;</span>
<span style="color:#ff9900;">                myNewRow["ProcessName"] = winProc.ProcessName;</span>
<span style="color:#ff9900;">                ProcessTable.Rows.Add(myNewRow);</span>
<span style="color:#ff9900;">                i++;</span>
<span style="color:#ff9900;">            }</span>
<span style="color:#ff9900;">            return ProcessTable;
        }</span>
<span style="color:#ff9900;">    }</span>
<span style="color:#ff9900;">}</span></pre>
<p><img title="r2" src="http://jyotsnakalambe.files.wordpress.com/2009/12/r2.jpg?w=468&#038;h=351" alt="" width="468" height="351" /></p>
<p>Build this project. Once your have build Project successfully the .dll file will be generated at bin/debug folder location.</p>
<p><span style="color:#ff0000;"><strong>Step 2:</strong></span></p>
<p>Now create a windows application project for developing a “SERVER”. Add reference of Remote class (.dll file) in the project. Add a button and label control on the windows form. As shown in the picture</p>
<p><strong><a href="http://jyotsnakalambe.files.wordpress.com/2009/12/r3.jpg"><img class="aligncenter size-full wp-image-256" title="r3" src="http://jyotsnakalambe.files.wordpress.com/2009/12/r3.jpg?w=468&#038;h=351" alt="" width="468" height="351" /></a></strong></p>
<p>Now add below code in the .CS file . don’t forget to add Remoting related namespaces in the project and Add the names space System.Runtime.Remoting from References</p>
<p><strong><a href="http://jyotsnakalambe.files.wordpress.com/2009/12/addref.jpg"><img class="aligncenter size-full wp-image-257" title="addref" src="http://jyotsnakalambe.files.wordpress.com/2009/12/addref.jpg?w=468&#038;h=398" alt="" width="468" height="398" /></a></strong></p>
<pre><span style="color:#ff9900;">using System;</span>
<span style="color:#ff9900;">using System.Collections.Generic;</span>
<span style="color:#ff9900;">using System.ComponentModel;</span>
<span style="color:#ff9900;">using System.Data;</span>
<span style="color:#ff9900;">using System.Drawing;</span>
<span style="color:#ff9900;">using System.Text;</span>
<span style="color:#ff9900;">using System.Windows.Forms;</span>
<span style="color:#ff9900;">using System.Runtime.Remoting;</span>
<span style="color:#ff9900;">using System.Runtime.Remoting.Channels;</span>
<span style="color:#ff9900;">using System.Runtime.Remoting.Channels.Tcp;</span>
<span style="color:#ff9900;">namespace Server</span>
<span style="color:#ff9900;">{</span>
<span style="color:#ff9900;">    public partial class Form1 : Form</span>
<span style="color:#ff9900;">    {</span>
<span style="color:#ff9900;">        public Form1()</span>
<span style="color:#ff9900;">        {</span>
<span style="color:#ff9900;">            InitializeComponent();</span>
<span style="color:#ff9900;">        }</span>
<span style="color:#ff9900;">        private void button1_Click(object sender, EventArgs e)</span>
<span style="color:#ff9900;">        {</span>
<span style="color:#ff9900;">            TcpChannel tcpChannel = new TcpChannel(8010);</span>
<span style="color:#ff9900;">            ChannelServices.RegisterChannel(tcpChannel,false);</span>
<span style="color:#ff9900;">            RemotingConfiguration.
            RegisterWellKnownServiceType(typeof(RemoteClass.Remote),
             "abc",WellKnownObjectMode.SingleCall);</span>
<span style="color:#ff9900;">            label1.Text = "Server is running";</span>
<span style="color:#ff9900;">        }</span>
<span style="color:#ff9900;">    }</span>
<span style="color:#ff9900;">}</span></pre>
<p>Build this project.</p>
<p><span style="color:#ff0000;"><strong>Step 3:</strong></span></p>
<p>Now create a windows application project for developing a “CLIENT”. Add reference of Remote class (.dll file) in the project.</p>
<p>Add a button, datagridview and label control on the windows form. As shown in the picture</p>
<p><strong><a href="http://jyotsnakalambe.files.wordpress.com/2009/12/r4.jpg"><img class="aligncenter size-full wp-image-258" title="r4" src="http://jyotsnakalambe.files.wordpress.com/2009/12/r4.jpg?w=468&#038;h=351" alt="" width="468" height="351" /></a></strong></p>
<p>Now add below code in the .CS file . don’t forget to add Remoting related namespaces in the project and Add it namesspace System.Runtime.Remoting from Reference. Just like Server project. Now on View Button Click add below Code.</p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;color:#ff9900;white-space:pre;">using System;</span></p>
<pre><span style="color:#ff9900;">using System.Collections.Generic;</span>
<span style="color:#ff9900;">using System.ComponentModel;</span>
<span style="color:#ff9900;">using System.Data;</span>
<span style="color:#ff9900;">using System.Drawing;</span>
<span style="color:#ff9900;">using System.Text;</span>
<span style="color:#ff9900;">using System.Windows.Forms;</span>
<span style="color:#ff9900;">using System.Runtime.Remoting;</span>
<span style="color:#ff9900;">using System.Runtime.Remoting.Channels;</span>
<span style="color:#ff9900;">using System.Runtime.Remoting.Channels.Tcp;</span>
<span style="color:#ff9900;">//Adding the names space System.Runtime.Remoting from References</span><span style="color:#ff9900;"> </span>
<span style="color:#ff9900;">namespace Client</span>
<span style="color:#ff9900;">{</span>
<span style="color:#ff9900;">        public partial class Form1 : Form</span><span style="color:#ff9900;">   {</span>
<span style="color:#ff9900;">        RemoteClass.Remote RemoteObject = new RemoteClass.Remote();</span>
<span style="color:#ff9900;">        public Form1()</span>
<span style="color:#ff9900;">        {</span>
<span style="color:#ff9900;">            InitializeComponent();</span>
<span style="color:#ff9900;">        }</span>
<span style="color:#ff9900;">         private void button1_Click(object sender, EventArgs e)</span>
<span style="color:#ff9900;">        {</span>
<span style="color:#ff9900;">          RemoteObject = (RemoteClass.Remote)Activator.GetObject
         (typeof(RemoteClass.Remote), "tcp://192.168.16.51:8010/abc");</span>
<span style="color:#ff9900;">            DataTable a = RemoteObject.Remoteprocesses();</span>
<span style="color:#ff9900;">            dataGridView1.DataSource = a;</span>
<span style="color:#ff9900;">        }    }</span>
<span style="color:#ff9900;">}</span></pre>
<p>Build this project.</p>
<p>Now let’s test the project. By pressing F5 in Server and Client project…</p>
<p><a href="http://jyotsnakalambe.files.wordpress.com/2009/12/final.jpg"><img class="aligncenter size-full wp-image-259" title="final" src="http://jyotsnakalambe.files.wordpress.com/2009/12/final.jpg?w=468&#038;h=351" alt="" width="468" height="351" /></a></p>
<p>Here if you are having two machines namely X &amp; Y and you want view the process details of X machine then simply you need to install the Server on the X machine and from Y machine Client you can monitor it.</p>
<p>i Hope u all understand a small example of remoting..if you like this example comment me..</p>
<p><strong><span style="text-decoration:underline;">n joy Diving in .NET World&#8230; </span></strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jyotsnakalambe.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jyotsnakalambe.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jyotsnakalambe.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jyotsnakalambe.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jyotsnakalambe.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jyotsnakalambe.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jyotsnakalambe.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jyotsnakalambe.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jyotsnakalambe.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jyotsnakalambe.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jyotsnakalambe.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jyotsnakalambe.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jyotsnakalambe.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jyotsnakalambe.wordpress.com/254/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=254&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jyotsnakalambe.wordpress.com/2009/12/04/let%e2%80%99s-learn-remoting-in-net-3-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfa10648f43bf7f998c80a1c9f035235?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jyotsnakalambe</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/12/r1.jpg" medium="image">
			<media:title type="html">r1</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/12/r2.jpg" medium="image">
			<media:title type="html">r2</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/12/r3.jpg" medium="image">
			<media:title type="html">r3</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/12/addref.jpg" medium="image">
			<media:title type="html">addref</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/12/r4.jpg" medium="image">
			<media:title type="html">r4</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/12/final.jpg" medium="image">
			<media:title type="html">final</media:title>
		</media:content>
	</item>
		<item>
		<title>Shortcuts are for .NET developers</title>
		<link>http://jyotsnakalambe.wordpress.com/2009/11/04/shortcuts-are-for-developers-not-life/</link>
		<comments>http://jyotsnakalambe.wordpress.com/2009/11/04/shortcuts-are-for-developers-not-life/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 10:39:20 +0000</pubDate>
		<dc:creator>jyotsnakalambe</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[VS.NET]]></category>

		<guid isPermaLink="false">http://jyotsnakalambe.wordpress.com/?p=264</guid>
		<description><![CDATA[Usually I never recommend taking shortcuts in life, as it is priceless. But shortcuts can be useful for you, if you are a asp.net, vb, c# programmer or web developer who love to work with visual Studio 2003/2005. It will help you in finishing your work more quickly and the saved time can be enjoyed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=264&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><span style="font-weight:normal;font-size:13px;">Usually I never recommend taking shortcuts in life, as it is priceless. But shortcuts can be useful for you, if you are a asp.net, vb, c# programmer or web developer who love to work with visual Studio 2003/2005. It will help you in finishing your work more quickly and the saved time can be enjoyed with your friends. I found these while searching the same for myself, and now would happily like to share with others. So here is the Comprehensive list of keyboard shortcuts of Visual Studio Application Programming and Internet Explorer 7(IE7).</span></h2>
<p>[pdf] [size: 120KB] <a href="http://www.ashesh.net/blog/downloads/PDF/VisualStudio.NET_2005_Keyboard_Shortcuts.pdf" target="_blank">VisualStudio.NET_2005_Keyboard_Shortcuts.pdf</a><br />
[pdf] [size:1.5MB] <a href="http://www.ashesh.net/blog/downloads/PDF/VisualBasic_2005_keyboard_shortcuts.pdf" target="_blank">VisualBasic_2005_keyboard_shortcuts.pdf</a><br />
[pdf] [size:1.4MB] <a href="http://www.ashesh.net/blog/downloads/PDF/VCSharp_2005_keyboard_shortcuts.pdf" target="_blank">VCSharp_2005_keyboard_shortcuts.pdf</a><br />
[pdf] [size:41KB] <a href="http://www.ashesh.net/blog/downloads/PDF/MostUsed_Shortcuts_VisualStudio2003_2005.pdf" target="_blank">MostUsed_Shortcuts_VisualStudio2003_2005.pdf</a><br />
[pdf] [size:760KB] <a href="http://www.ashesh.net/blog/downloads/PDF/InternetExplorer7_shortcutRefrence.pdf" target="_blank">InternetExplorer7_shortcutRefrence.pdf</a></p>
<p>To get Microsoft list of Complete list of default setting Visual Studio shortcuts keys, go to: http://msdn2.microsoft.com/en-us/library/xte2hh6a(vs.71).aspx<br />
All of the download are available in PDF format, just download them and Speed up the growth of Information technology.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jyotsnakalambe.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jyotsnakalambe.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jyotsnakalambe.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jyotsnakalambe.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jyotsnakalambe.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jyotsnakalambe.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jyotsnakalambe.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jyotsnakalambe.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jyotsnakalambe.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jyotsnakalambe.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jyotsnakalambe.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jyotsnakalambe.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jyotsnakalambe.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jyotsnakalambe.wordpress.com/264/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=264&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jyotsnakalambe.wordpress.com/2009/11/04/shortcuts-are-for-developers-not-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfa10648f43bf7f998c80a1c9f035235?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jyotsnakalambe</media:title>
		</media:content>
	</item>
		<item>
		<title>.NET Framework 3.5 (Short Explanation for Interview)</title>
		<link>http://jyotsnakalambe.wordpress.com/2009/11/04/net-framework-3-5-short-explanation-for-interview/</link>
		<comments>http://jyotsnakalambe.wordpress.com/2009/11/04/net-framework-3-5-short-explanation-for-interview/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 09:58:57 +0000</pubDate>
		<dc:creator>jyotsnakalambe</dc:creator>
				<category><![CDATA[.NET Framework]]></category>

		<guid isPermaLink="false">http://jyotsnakalambe.wordpress.com/?p=250</guid>
		<description><![CDATA[The .NET Framework 3.5 is an integral Windows component that supports building and running the next generation of applications and Web services. The key components of the .NET Framework are the common language runtime (CLR) and the .NET Framework class library, which includes ADO.NET, ASP.NET, Windows Forms, and Windows Presentation Foundation (WPF). The .NET Framework [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=250&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The .NET Framework 3.5 is an integral Windows component that supports building and running the next generation of applications and Web services. The key components of the .NET Framework are the common language runtime (CLR) and the .NET Framework class library, which includes ADO.NET, ASP.NET, Windows Forms, and Windows Presentation Foundation (WPF). The .NET Framework provides a managed execution environment, simplified development and deployment, and integration with a wide variety of programming languages. For a brief introduction to the architecture of the .NET Framework, see <a href="http://msdn.microsoft.com/en-us/library/zw4w595w.aspx">.NET Framework Conceptual Overview</a>.</p>
<p> The following illustration shows the relationship of the common language runtime and the class library to your applications and to the overall system. The illustration also shows how managed code operates within a larger architecture.</p>
<p><img class="alignnone" title="framework3.5" src="http://i.msdn.microsoft.com/zw4w595w.circle(en-us,VS.90).gif" alt="" width="430" height="425" /></p>
<p> <strong>Enhancement from .NET Framework 2.0 to .NET Framework 3.5 are Mention below:</strong></p>
<p> <a href="http://msdn.microsoft.com/en-us/library/ms229335.aspx">.NET Framework Class Library</a></p>
<p>Supplies syntax, code examples, and related information for each class contained in the .NET Framework namespaces.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/63bf39c2.aspx">Quick Technology Finder</a></p>
<p>Provides a table of links to the main technology areas of the .NET Framework.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms171868.aspx">What&#8217;s New in the .NET Framework</a></p>
<p>Describes key features that have been added or modified in the latest versions of the .NET Framework.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/a4t23ktk.aspx">Overview of the .NET Framework</a></p>
<p>Describes key .NET Framework concepts such as the common language runtime, the common type system (CTS), cross-language interoperability, managed execution, assemblies, and security.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/csxbhtye.aspx">Core Development Technologies</a></p>
<p>Explains common programming tasks that apply to a range of .NET Framework applications. Includes topics such as accessing data, file and stream I/O, configuration, encoding, deployment, and debugging.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/a493kdy6.aspx">Advanced Development Technologies</a></p>
<p>Provides information about sophisticated development tasks and techniques in the .NET Framework.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/fkytk30f.aspx">Security in the .NET Framework</a></p>
<p>Provides information about the classes and services in the .NET Framework that facilitate secure application development.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb400852.aspx">ASP.NET Portal</a></p>
<p>Provides links to documentation about ASP.NET applications, Web Forms, and Web services.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/cc656767.aspx">Windows Forms Portal</a></p>
<p>Provides links to documentation about common programming tasks in Windows Forms applications.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/f44bbwa1.aspx">.NET Compact Framework</a></p>
<p>Introduces the .NET Framework-based, hardware-independent environment for running applications on resource-constrained computing devices.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms754130.aspx">Windows Presentation Foundation</a></p>
<p>Provides information about developing applications using Windows Presentation Foundation (WPF).</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms735119.aspx">Windows Communication Foundation for Applications</a></p>
<p>Provides information on the Windows Communication Foundation (WCF) programming model for building service-oriented applications.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms733090.aspx">Windows CardSpace</a></p>
<p>Provides information about CardSpace, which is Microsoft&#8217;s implementation of an identity metasystem.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms735967.aspx">Windows Workflow Foundation</a></p>
<p>Provides information on the framework, programming model, and tools for Windows Workflow Foundation (WF).</p>
<p><a href="http://msdn.microsoft.com/en-us/library/sxe8hcf2.aspx">General Reference for the .NET Framework</a></p>
<p>Provides reference information related to the .NET Framework. Includes sections on languages and compilers, tools, technical references, and a glossary of terms.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb400851.aspx">Tools (.NET Framework)</a></p>
<p>Provides information about tools that make it easier for you to create, deploy, and manage applications and components that target the .NET Framework.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb400848.aspx">Samples (.NET Framework Technologies)</a></p>
<p>Provides samples that illustrate various aspects of the .NET Framework.</p>
<p>Enjoy depth of .NET&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jyotsnakalambe.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jyotsnakalambe.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jyotsnakalambe.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jyotsnakalambe.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jyotsnakalambe.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jyotsnakalambe.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jyotsnakalambe.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jyotsnakalambe.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jyotsnakalambe.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jyotsnakalambe.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jyotsnakalambe.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jyotsnakalambe.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jyotsnakalambe.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jyotsnakalambe.wordpress.com/250/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=250&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jyotsnakalambe.wordpress.com/2009/11/04/net-framework-3-5-short-explanation-for-interview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfa10648f43bf7f998c80a1c9f035235?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jyotsnakalambe</media:title>
		</media:content>

		<media:content url="http://i.msdn.microsoft.com/zw4w595w.circle(en-us,VS.90).gif" medium="image">
			<media:title type="html">framework3.5</media:title>
		</media:content>
	</item>
		<item>
		<title>Create Custom Control in C#.NET</title>
		<link>http://jyotsnakalambe.wordpress.com/2009/10/09/create-custom-control-in-c-net/</link>
		<comments>http://jyotsnakalambe.wordpress.com/2009/10/09/create-custom-control-in-c-net/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 07:41:26 +0000</pubDate>
		<dc:creator>jyotsnakalambe</dc:creator>
				<category><![CDATA[C#.NET]]></category>

		<guid isPermaLink="false">http://jyotsnakalambe.wordpress.com/?p=224</guid>
		<description><![CDATA[DOWNLOAD EXAMPLE HERE Contents Overview Types of Custom Controls User controls Inherited controls Owner-drawn controls Extender providers Communication between User Controls and subscribing Applications Publising and Subscribing Events Events and Delegates Submit Button User Control   Create the Submit Button User Control Using the Submit User Control in a Windows Application Login Validation User Control [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=224&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://www.akadia.com/download/documents/UserControls.zip"><span style="color:#ff00ff;">DOWNLOAD EXAMPLE HERE</span></a></strong></p>
<p><strong>Contents </strong></p>
<p><strong><span style="color:#000000;">Overview</span><span style="color:#000000;"> </span></strong></p>
<p><strong><span style="color:#993300;">Types of Custom Controls </span></strong></p>
<p><span style="color:#993300;">User controls<br />
Inherited controls<br />
Owner-drawn controls<br />
Extender providers</span></p>
<p><strong><span style="color:#993300;">Communication between User Controls and subscribing Applications </span></strong></p>
<p><span style="color:#993300;">Publising and Subscribing Events<br />
Events and Delegates</span></p>
<p><span style="color:#993300;"><strong>Submit Button User Control</strong><strong> </strong><strong> </strong></span></p>
<p><span style="color:#993300;">Create the Submit Button User Control<br />
Using the Submit User Control in a Windows Application</span></p>
<p><span style="color:#993300;"><strong>Login Validation User Control</strong><strong> </strong><strong> </strong></span></p>
<p><span style="color:#993300;">Create the Login Validation User Control<br />
Using the Login Validation User Control in a Windows Application</span></p>
<p><span style="color:#993300;"><strong>Format Mask Control</strong><strong> </strong><strong> </strong></span></p>
<p><span style="color:#993300;">Create the Format Mask Control<br />
Using the Edit Mask User Control in a Windows Application</span></p>
<p><strong><span style="color:#993300;">Toggle Button User Control </span></strong></p>
<p><span style="color:#993300;">Create the Toggle Button User Control<br />
Using the Toggle Button User Control in a Windows Application</span></p>
<p> </p>
<p> </p>
<hr size="2" /><strong>Overview</strong><strong> </strong></p>
<p> </p>
<p> </p>
<p>Embedding user controls in a Windows form is just like adding a simple button or text box that are already provided with .NET. These basic controls were written essentially like you code your own controls. Typically the controls you design are to be used in multiple forms or to modularize your code. These reasons help reduce the amount of code you have to type as well as make it easier for you to change your implementation. <strong>There should almost never be any reason to duplicate code because it leaves a lot of room for bugs</strong>. So, implementing functionality specific to your control in the control&#8217;s source code is a good idea. This reduces code duplication as well as modularize your code, which is a good programming guideline.</p>
<p>Custom controls are a key theme in .NET development. They can help your programming style by improving encapsulation, simplifying a programming model, and making user interface more &#8220;pluggable&#8221; (i.e., making it easier to swap out one control and replace it with a completely different one without rewriting your form code). Of course, custom controls can have other benefits, including the ability to transform a generic window into a state-of-the-art modern interface.</p>
<p>Generally, developers tackle custom control development for one of three reasons:</p>
<table style="width:962px;height:132px;" border="0" cellspacing="0" cellpadding="0" width="962">
<tbody>
<tr>
<td width="100%">
<ul>
<li>
<h3>To create controls that abstract away unimportant details and are tailored for a specific type of data. You will see  with custom ListView and TreeView examples.</h3>
</li>
<li>
<h3>To create controls that provide entirely new functionality, or just combine existing UI elements in a unique way.</h3>
</li>
<li>
<h3>To create controls with a distinct original look, or ones that mimic popular controls in professional applications (like Microsoft&#8217;s Outlook bar) that aren&#8217;t available to the masses.</h3>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>In .NET, creating a custom control is as easy as creating an ordinary class. You simply inherit from the best possible ancestor and add the specific features you need. Best of all, you can create a custom control class as part of an existing project, and then decide later to place it in a separate assembly that can be shared with other programmers.</p>
<p><strong>Types of Custom Controls</strong><strong> </strong></p>
<p>Developers often make a distinction between three or four types of controls:</p>
<table border="0" cellspacing="0" cellpadding="0" width="90%">
<tbody>
<tr>
<td width="100%">
<ul>
<li>
<h3>User controls are the simplest type of control. They inherit from the System.Windows.Forms.UserControl class, and follow a model of composition. Usually, user controls combine more than one control in a logical unit (like a group of text boxes for entering address information).</h3>
</li>
<li>
<h3>Inherited controls are generally more powerful and flexible. With an inherited control, you choose the existing .NET control that is closest to what you want to provide. Then, you derive a custom class that overrides or adds properties and methods. The examples you&#8217;ve looked at so far in this book, including the custom TreeViews and ListViews, have all been inherited controls.</h3>
</li>
<li>
<h3>Owner-drawn controls generally use GDI+ drawing routines to generate their interfaces from scratch. Because of this, they tend to inherit from a base class like System.Windows.Forms.Control. Owner-drawn controls require the most work and provide the most customizable user interface.</h3>
</li>
<li>
<h3>Extender providers, which aren&#8217;t necessarily controls at all. These components add features to other controls on a form, and provide a remarkable way to implement extensible user interface.</h3>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p><strong>Communication between User Controls and subscribing Applications</strong><strong> </strong></p>
<p>Because the basic .NET controls are contained within our user control, <strong>events are not fired for the contained applications.</strong> Our user control is treated like any other and must implement it&#8217;s own properties (besides those inherited from <em>System.Windows.Forms.Control</em>) and events.</p>
<p><strong>Publising and Subscribing Events</strong><strong> </strong></p>
<p>The Event model in C# finds its roots in the event programming model that is popular in asynchronous programming. The basic foundation behind this programming model is the idea of &#8220;publisher and subscribers.&#8221; In this model, you have <em>publishers</em> who will do some logic and publish an &#8220;event.&#8221; Publishers will then send out their event only to <em>subscribers</em> who have subscribed to receive the specific event.</p>
<p>In C#, any object can <em>publish</em> a set of events to which other applications can <em>subscribe</em>. When the publishing class raises an event, all the subscribed applications are notified. The following figure shows this mechanism.</p>
<p align="center"><img class="aligncenter size-medium wp-image-229" title="1" src="http://jyotsnakalambe.files.wordpress.com/2009/10/11.jpg?w=386&#038;h=332" alt="1" width="386" height="332" /> </p>
<p><strong>Events and Delegates</strong><strong> </strong></p>
<p>At the heart of Events in C# are Delegates. When an object generates an events, it must send the event out. <strong>The way that events are dispatched is through the use of delegates</strong>. Let&#8217;s look how Events are declared in C#.</p>
<p>[attributes] [modifier] event type member-name;</p>
<p>       Modifier is any allowable scope modifier.</p>
<p>       Type must be a delegate.</p>
<p>       Member-name is the Name of the Event with which you will refer to the event in your code.</p>
<p>The important thing to note here is the delegate type that events should use. In the strictest sense, the delegate can be any legal delegate. But there is a convention that you should follow and is one that Window Forms uses. By Convention, the delegate should accept two parameters:</p>
<ol>
<li>The object that generated the event</li>
<li>The parameters for the specific event</li>
</ol>
<p>An example of an event / delegate is as follows:</p>
<p>public <strong>delegate</strong> void <strong>SubmitClickedHandler</strong>(object sender, EventArgs e);<strong><br />
</strong>public <strong>event</strong> <strong>SubmitClickedHandler</strong> <strong>SubmitClicked</strong>;</p>
<p><em>SubmitClickedHandler</em> is the name of the delegate, <em>sender</em> is self explanatory. <em>EventArgs</em> is defined under the System namespace and is a very plain class. <em>SubmitClicked</em> is the name of the event, <strong>which is published to the Subscriber.</strong></p>
<p><strong>Submit Button User Control</strong><strong> </strong></p>
<p><strong>Create the Submit Button User Control</strong><strong> </strong></p>
<p>The control we will create will contain a text box for your name and a button that will fire an event. To begin, open Visual Studio .NET and begin a new C# <strong> Windows Control Library</strong>. You may name it whatever you like, for this sample the project name will be <em>SubmitButton</em>.</p>
<p style="text-align:center;" align="center"><img class="size-medium wp-image-231  aligncenter" title="2" src="http://jyotsnakalambe.files.wordpress.com/2009/10/2.jpg?w=469&#038;h=172" alt="2" width="469" height="172" /> </p>
<p>using System;</p>
<p>using System.Collections;</p>
<p>using System.ComponentModel;</p>
<p>using System.Drawing;</p>
<p>using System.Data;</p>
<p>using System.Windows.Forms;</p>
<p>namespace Akadia</p>
<p>{</p>
<p>    namespace SubmitButton</p>
<p>    {</p>
<p>        // User Control which contain a text box for your</p>
<p>        // name and a button that will fire an event.</p>
<p>        public class SubmitButtonControl : System.Windows.Forms.UserControl</p>
<p>        {</p>
<p>            private System.Windows.Forms.TextBox txtName;</p>
<p>            private System.Windows.Forms.Label lblName;</p>
<p>            private System.Windows.Forms.Button btnSubmit;</p>
<p>            private System.ComponentModel.Container components = null;</p>
<p>            // Declare delegate for submit button clicked.</p>
<p>            //</p>
<p>            // Most action events (like the Click event) in Windows Forms</p>
<p>            // use the EventHandler delegate and the EventArgs arguments.</p>
<p>            // We will define our own delegate that does not specify parameters.</p>
<p>            // Mostly, we really don&#8217;t care what the conditions of the</p>
<p>            // click event for the Submit button were, we just care that</p>
<p>            // the Submit button was clicked.</p>
<p>            <strong>public delegate void SubmitClickedHandler();</strong></p>
<p>            // Constructor           public SubmitButtonControl()</p>
<p>            {</p>
<p>                // Create visual controls</p>
<p>                InitializeComponent();</p>
<p>            }</p>
<p>            // Clean up any resources being used.</p>
<p>            protected override void Dispose( bool disposing )</p>
<p>            {</p>
<p>                if( disposing )</p>
<p>                {</p>
<p>                    if( components != null )</p>
<p>                        components.Dispose();</p>
<p>                }</p>
<p>                base.Dispose( disposing );</p>
<p>            }</p>
<p>            &#8230;..</p>
<p>            &#8230;..</p>
<p>            // Declare the event, which is associated with our</p>
<p>            // delegate SubmitClickedHandler(). Add some attributes</p>
<p>            // for the Visual C# control property.</p>
<p>            [Category("Action")]</p>
<p>            [Description("Fires when the Submit button is clicked.")]</p>
<p>            <strong>public event SubmitClickedHandler SubmitClicked;</strong></p>
<p>            // Add a protected method called OnSubmitClicked().</p>
<p>            // You may use this in child classes instead of adding</p>
<p>            // event handlers.</p>
<p>            <strong>protected virtual void OnSubmitClicked()</strong></p>
<p>            {</p>
<p>                // If an event has no subscribers registerd, it will</p>
<p>                // evaluate to null. The test checks that the value is not</p>
<p>                // null, ensuring that there are subsribers before</p>
<p>                // calling the event itself.</p>
<p>                <strong>if (SubmitClicked != null)</strong></p>
<p><strong>                {</strong></p>
<p><strong>                    SubmitClicked();  </strong><strong>// Notify Subscribers</strong><strong> </strong></p>
<p><strong>                }</strong></p>
<p><strong>            }</strong></p>
<p>            // Handler for Submit Button. Do some validation before</p>
<p>            // calling the event.</p>
<p>            <strong>private void btnSubmit_Click(object sender, System.EventArgs e)</strong></p>
<p><strong>            {</strong></p>
<p><strong>                if (txtName.Text.Length == 0)</strong></p>
<p><strong>                {</strong></p>
<p><strong>                    MessageBox.Show(&#8220;Please enter your name.&#8221;);</strong></p>
<p><strong>                }</strong></p>
<p><strong>                else</strong></p>
<p><strong>                {</strong></p>
<p><strong>                    OnSubmitClicked();</strong></p>
<p><strong>                }</strong></p>
<p><strong>            }</strong></p>
<p>            // Read / Write Property for the User Name. This Property</p>
<p>            // will be visible in the containing application.</p>
<p>            [Category("Appearance")]</p>
<p>            [Description("Gets or sets the name in the text box")]</p>
<p>            <strong>public string UserName</strong></p>
<p><strong>            {</strong></p>
<p><strong>                get { return txtName.Text; }</strong></p>
<p><strong>                set { txtName.Text = value; }</strong></p>
<p><strong>            }</strong></p>
<p>        }</p>
<p>    }</p>
<p>}</p>
<p><strong>Using the Submit User Control in a Windows Application</strong><strong> </strong></p>
<p>Using the control in a Windows form is trivial. It&#8217;s just like adding any other control like a button or a DataGrid. First, create a new Windows Application project named: <em>TestApp.</em> Add a reference to the Submit Button User Control DLL named: <em>SubmitButton.dll.</em> Now you are ready to customize the Toolbox: Right-Click the Toolbox, .NET Framework Components, Browse, select the <em>SubmitButton.dll.</em></p>
<p align="center"><img title="3" src="http://jyotsnakalambe.files.wordpress.com/2009/10/3.jpg?w=386&#038;h=226" alt="3" width="386" height="226" /> </p>
<p>The Submit Button User Control is now added to the Toolbox and can be inserted in Windows Form as any other control. Now we want to handle the <em>SubmitClicked</em> event for the user control. This will simply close the form. The control itself will take care of validation and the event won&#8217;t be fired unless the text is valid. Click on the lightning-looking button (for events) with the control selected and you&#8217;ll see the event, <em>SubmitClicked</em>, listed under the &#8220;Action&#8221; category. Click on it once and you&#8217;ll see the description we added previously. Now double-click it and VS.NET will add an event handler <em>SubmitClicked()</em> which displays the name from the user control and close the form when the event is fired.</p>
<p align="center"><img class="aligncenter size-medium wp-image-233" title="4" src="http://jyotsnakalambe.files.wordpress.com/2009/10/4.jpg?w=398&#038;h=163" alt="4" width="398" height="163" /> </p>
<p>using System;</p>
<p>using System.Drawing;</p>
<p>using System.Collections;</p>
<p>using System.ComponentModel;</p>
<p>using System.Windows.Forms;</p>
<p>using System.Data;</p>
<p>namespace TestApp</p>
<p>{</p>
<p>   // Test Application for the Submit Button User Control</p>
<p>    public class TestApp : System.Windows.Forms.Form</p>
<p>    {</p>
<p>        <strong>private Akadia.SubmitButton.SubmitButtonControl submitButtonControl;</strong></p>
<p>        private System.ComponentModel.Container components = null;</p>
<p>        &#8230;.</p>
<p>        &#8230;..</p>
<p>        [STAThread]</p>
<p>        static void Main()</p>
<p>        {</p>
<p>            Application.Run(new TestApp());</p>
<p>        }</p>
<p>        // Handle the SubmitClicked Event</p>
<p>        <strong>private void SubmitClicked()</strong></p>
<p><strong>        {</strong></p>
<p><strong>            MessageBox.Show(String.Format(&#8220;Hello, {0}!&#8221;,</strong></p>
<p><strong>                submitButtonControl.UserName));</strong></p>
<p><strong>            this.Close();</strong></p>
<p><strong>        }</strong></p>
<p>    }</p>
<p>}</p>
<p><strong>Login Validation User Control</strong><strong> </strong></p>
<p><strong>Create the Login Validation User Control</strong><strong> </strong></p>
<p>The following sample shows how to implement a Login user control. When the user clicks the Login button, the control will validate the data entered by the user. If the user has left either the User name or the Password text boxes empty, the loginError validation control will display an error icon against the offending control. The Password will then be checked by a &#8220;secret algorithm&#8221;, if the Password is valid, the user control will raise an event called LoginSuccess; otherwise it will fire a different event called LoginFailed.</p>
<p>In this sample we use the predefined System.EventHandler delegate. This delegate is useful if you want to define an event that has no additional data. The event will be passed an empty System.EventArgs parameter instead. This is the delegate used by many of the Windows Forms.</p>
<p align="center"><img class="aligncenter size-medium wp-image-234" title="dotnet_user_control_5" src="http://jyotsnakalambe.files.wordpress.com/2009/10/dotnet_user_control_5.jpg?w=442&#038;h=205" alt="dotnet_user_control_5" width="442" height="205" /> </p>
<p>using System;<br />
using System.Collections;<br />
using System.ComponentModel;<br />
using System.Drawing;<br />
using System.Data;<br />
using System.Windows.Forms;</p>
<p>namespace Akadia<br />
{<br />
    namespace LoginControl<br />
    {<br />
        // Implementation of a Login User Control<br />
        public class LoginControl : System.Windows.Forms.UserControl<br />
        {<br />
            private System.Windows.Forms.Label lblUserName;<br />
            private System.Windows.Forms.Label lblPassword;<br />
            private System.Windows.Forms.TextBox txtUserName;<br />
            private System.Windows.Forms.TextBox txtPassword;<br />
            private System.Windows.Forms.Button btnLogin;<br />
            private System.Windows.Forms.ErrorProvider erpLoginError;<br />
            private System.Windows.Forms.StatusBar stbMessage;<br />
            private System.ComponentModel.Container components = null;<br />
 <br />
            // Here we use the predefined System.EventHandler delegate.<br />
            // This delegate is useful if you want to define an event<br />
            // that has no additional data. The event will be passed an<br />
            // empty System.EcentArgs parameter instead. This is the<br />
            // delegate used by many of the Windows Forms.<br />
            <strong>public delegate void EventHandler(Object sender, EventArgs e);<br />
            public event EventHandler LoginSuccess;<br />
            public event EventHandler LoginFailed;<br />
 </strong><br />
            // Constructor<br />
            public LoginControl()<br />
            {<br />
                InitializeComponent();<br />
            }<br />
 <br />
            &#8230;.<br />
            &#8230;.<br />
 <br />
            // This is the very simple Login Check Validation<br />
            // The Password mus be &#8230; &#8220;secret&#8221; &#8230;..<br />
            private bool LoginCheck(string pName, string pPassword)<br />
            {<br />
                return pPassword.Equals(&#8220;secret&#8221;);<br />
            }<br />
 <br />
            // Validate Login, in any case call the LoginSuccess or<br />
            // LoginFailed event, which will notify the Application&#8217;s<br />
            // Event Handlers.<br />
            private void loginButtonClicked(object sender, System.EventArgs e)<br />
            {<br />
                // User Name Validation<br />
                if (txtUserName.Text.Length == 0)<br />
                {<br />
                    erpLoginError.SetError(txtUserName,&#8221;Please enter a user name&#8221;);<br />
                    stbMessage.Text = &#8220;Please enter a user name&#8221;;<br />
                    return;<br />
                }<br />
                else<br />
                {<br />
                    erpLoginError.SetError(txtUserName,&#8221;");<br />
                    stbMessage.Text = &#8220;&#8221;;<br />
                }<br />
 <br />
                // Password Validation<br />
                if (txtPassword.Text.Length == 0)<br />
                {<br />
                    erpLoginError.SetError(txtPassword,&#8221;Please enter a password&#8221;);<br />
                    stbMessage.Text = &#8220;Please enter a password&#8221;;<br />
                    return;<br />
                }<br />
                else<br />
                {<br />
                    erpLoginError.SetError(txtPassword,&#8221;");<br />
                    stbMessage.Text = &#8220;&#8221;;<br />
                }<br />
 <br />
                // Check Password<br />
                if (LoginCheck(txtUserName.Text, txtPassword.Text))<br />
                {<br />
                    // If there any Subscribers for the LoginSuccess<br />
                    // Event, notify them &#8230;<br />
                    if (LoginSuccess != null)<br />
                    {<br />
                        LoginSuccess(this, new System.EventArgs());<br />
                    }<br />
                }<br />
                else<br />
                {<br />
                    // If there any Subscribers for the LoginFailed<br />
                    // Event, notify them &#8230;<br />
                    if (LoginFailed != null)<br />
                    {<br />
                        LoginFailed(this, new System.EventArgs());<br />
                    }<br />
                }<br />
            }<br />
 <br />
            // Read-Write Property for User Name Label<br />
            public string LabelName<br />
            {<br />
                get<br />
                {<br />
                    return lblUserName.Text;<br />
                }<br />
                set<br />
                {<br />
                    lblUserName.Text = value;<br />
                }<br />
            }<br />
 <br />
            // Read-Write Property for User Name Password<br />
            public string LabelPassword<br />
            {<br />
                get<br />
                {<br />
                    return lblPassword.Text;<br />
                }<br />
                set<br />
                {<br />
                    lblPassword.Text = value;<br />
                }<br />
            }<br />
 <br />
            // Read-Write Property for Login Button Text<br />
            public string LoginButtonText<br />
            {<br />
                get<br />
                {<br />
                    return btnLogin.Text;<br />
                }<br />
                set<br />
                {<br />
                    btnLogin.Text = value;<br />
                }<br />
            }<br />
 <br />
            // Read-Only Property for User Name<br />
            [Browsable(false)]<br />
            public string UserName<br />
            {<br />
                set<br />
                {<br />
                    txtUserName.Text = value;<br />
                }<br />
            }<br />
 <br />
            // Read-Only Property for Password<br />
            [Browsable(false)]<br />
            public string Password<br />
            {<br />
                set<br />
                {<br />
                    txtPassword.Text = value;<br />
                }<br />
            }</p>
<p>        }<br />
    }<br />
}</p>
<p><strong>Using the Login Validation User Control in a Windows Application</strong><strong> </strong></p>
<p>Create a new Windows Application project named: <em>TestApp</em>. Add a reference to the Login Validation User Control DLL named: <em>LoginControl.dll.</em> Now you are ready to customize the Toolbox: Right-Click the Toolbox, .NET Framework Components, Browse, select the <em>LoginControl.dll.</em></p>
<p align="center"> </p>
<p>using System;<br />
using System.Drawing;<br />
using System.Collections;<br />
using System.ComponentModel;<br />
using System.Windows.Forms;<br />
using System.Data;</p>
<p>namespace TestApp<br />
{<br />
    // Test Application for the Login Validation User Control<br />
    public class TestApp : System.Windows.Forms.Form<br />
    {<br />
        <strong>private Akadia.LoginControl.LoginControl loginControl;</strong><br />
        private System.ComponentModel.Container components = null;<br />
 <br />
        &#8230;.<br />
        &#8230;.<br />
 <br />
        [STAThread]<br />
        static void Main()<br />
        {<br />
            Application.Run(new TestApp());<br />
        }<br />
 <br />
        // This Event is fired by the Login Validation User Control<br />
        <strong>private void LoginFailed(object sender, System.EventArgs e)<br />
        {<br />
            MessageBox.Show(&#8220;Login falied &#8230;.&#8221;, &#8220;Login Validation&#8221;,<br />
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);<br />
        }</strong><br />
 <br />
        // This Event is fired by the Login Validation User Control<br />
        <strong>private void LoginSuccess(object sender, System.EventArgs e)<br />
        {<br />
            MessageBox.Show(&#8220;Login success &#8230;.&#8221;, &#8220;Login Validation&#8221;,<br />
                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);<br />
        }</strong><br />
    }<br />
}</p>
<p><strong>Format Mask Control</strong><strong> </strong></p>
<p><strong>Create the Format Mask Control</strong><strong> </strong></p>
<p><strong>An inherited control</strong> example is one for a custom masked text box. A masked text box is one that automatically formats the user&#8217;s input into the correct format. For example, it may add dashes or brackets to make sure it looks like a phone number. This task is notoriously difficult. One useful tool is Microsoft&#8217;s masked edit text box, which is provided as an ActiveX control with previous versions of Visual Studio.</p>
<p>The example of a masked text box is important because it demonstrates how features (rather than data) might be added to an existing control by <strong>subclassing</strong>. The example is still quite limited-notably, it restricts deletions and the<br />
use of the arrow keys. Tracking the cursor position, which is required to allow inline masked edits, results in a good deal of tedious code that only obscures the point.</p>
<p style="text-align:center;"> <img title="dotnet_user_control_7" src="http://jyotsnakalambe.files.wordpress.com/2009/10/dotnet_user_control_7.jpg?w=300&#038;h=179" alt="dotnet_user_control_7" width="300" height="179" /></p>
<p>using System;<br />
using System.Collections;<br />
using System.ComponentModel;<br />
using System.Drawing;<br />
using System.Data;<br />
using System.Windows.Forms;</p>
<p>namespace Akadia<br />
{<br />
    namespace FormatMask<br />
    {<br />
        // Extended User Control to implement an Edit Mask Text Box<br />
        public class EditMask : System.Windows.Forms.TextBox<br />
        {<br />
            // Fields<br />
            private string _mask;<br />
 <br />
            // Properties<br />
            public string Mask<br />
            {<br />
                get { return _mask; }<br />
                set<br />
                {<br />
                    _mask = value;<br />
                    this.Text = &#8220;&#8221;;<br />
                }<br />
            }<br />
 <br />
            // To use the masked control, the application programmer chooses<br />
            // a mask and applies it to the Mask property of the control.<br />
            // The number sign (#) represents any number, and the period (.)<br />
            // represents any letter. All other characters in the mask<br />
            // are treated as fixed characters, and are inserted automatically<br />
            // when needed. For example, in the phone number mask (###) ###-####<br />
            // the first bracket is inserted automatically when the user types<br />
            // the first number.<br />
            <strong>protected override void OnKeyPress(KeyPressEventArgs e)</strong><br />
            {<br />
                if (Mask != &#8220;&#8221;)<br />
                {<br />
                    // Suppress the typed character.<br />
                    e.Handled = true;<br />
 <br />
                    string newText = this.Text;<br />
 <br />
                    // Loop through the mask, adding fixed characters as needed.<br />
                    // If the next allowed character matches what the user has<br />
                    // typed in (a number or letter), that is added to the end.<br />
                    bool finished = false;<br />
                    for (int i = this.SelectionStart; i &lt; _mask.Length; i++)<br />
                    {<br />
                        switch (_mask[i].ToString())<br />
                        {<br />
                            case &#8220;#&#8221; :<br />
                                // Allow the keypress as long as it is a number.<br />
                                if (Char.IsDigit(e.KeyChar))<br />
                                {<br />
                                    newText += e.KeyChar.ToString();<br />
                                    finished = true;<br />
                                    break;<br />
                                }<br />
                                else<br />
                                {<br />
                                    // Invalid entry; exit and don&#8217;t change the text.<br />
                                    return;<br />
                                }<br />
                            case &#8220;.&#8221; :<br />
                                // Allow the keypress as long as it is a letter.<br />
                                if (Char.IsLetter(e.KeyChar))<br />
                                {<br />
                                    newText += e.KeyChar.ToString();<br />
                                    finished = true;<br />
                                    break;<br />
                                }<br />
                                else<br />
                                {<br />
                                    // Invalid entry; exit and don&#8217;t change the text.<br />
                                    return;<br />
                                }<br />
                            default :<br />
                                // Insert the mask character.<br />
                                newText += _mask[i];<br />
                                break;<br />
                        }<br />
                        if (finished)<br />
                        { break; }<br />
                    }<br />
 <br />
                    // Update the text.<br />
                    this.Text = newText;<br />
                    this.SelectionStart = this.Text.Length;<br />
                }<br />
                // base.OnKeyPress(e);<br />
            }<br />
 <br />
            // Stop special characters.<br />
            protected override void OnKeyDown(KeyEventArgs e)<br />
            {<br />
                e.Handled = true;<br />
            }<br />
        }<br />
    }<br />
}</p>
<p><strong>Using the Edit Mask User Control in a Windows Application</strong><strong> </strong></p>
<p>Create a new Windows Application project named: <em>TestApp</em>. Add a reference to the Edit Mask User Control DLL named: FormatMask.dll. Now you are ready to customize the Toolbox: Right-Click the Toolbox, .NET Framework Components, Browse, select the FormatMask.dll.</p>
<p>using System;<br />
using System.Drawing;<br />
using System.Collections;<br />
using System.ComponentModel;<br />
using System.Windows.Forms;<br />
using System.Data;</p>
<p>namespace TestApp<br />
{<br />
    // Test Application for the Edit mask User Control<br />
    public class TestApp : System.Windows.Forms.Form<br />
    {<br />
        <strong>private Akadia.FormatMask.EditMask editMask;</strong><br />
        private System.Windows.Forms.Label lblText;<br />
        private System.ComponentModel.Container components = null;<br />
 <br />
        public TestApp()<br />
        {<br />
            InitializeComponent();<br />
        }<br />
        &#8230;&#8230;<br />
        private void InitializeComponent()<br />
        {<br />
            &#8230;.<br />
            this.editMask.Location = new System.Drawing.Point(93, 63);<br />
            <strong>this.editMask.Mask = &#8220;[###]-(##)-#####&#8221;;</strong><br />
            this.editMask.Name = &#8220;editMask&#8221;;<br />
            this.editMask.TabIndex = 0;<br />
            &#8230;.<br />
        }<br />
 <br />
        static void Main()<br />
        {<br />
            Application.Run(new TestApp());<br />
        }<br />
    }<br />
}</p>
<p><strong>Toggle Button User Control</strong><strong> </strong></p>
<p><strong>Create the Toggle Button User Control</strong><strong> </strong></p>
<p>The Toggle Button User Control is an <strong>inherited control. </strong> When the user clicks a toggle Button, the Text and <em>BackColor</em> properties should be set according to the Checked state of the button. The natural place to do this is the Click event. However, keep in mind that you only want to extend the default Click event supplied with the CheckBox class rather than replacing is. In the .NET Framework documentation, <strong>you will be notice that controls typically have a protected OnXXX method that raises each event (where XXX is the name of the event)</strong> &#8211; for example the Click event is raised by the OnClick method. The Control call these methods when an event occurs. If you want to extend the Click event, <strong>the Trick is therefore to override the OnClick method</strong>.</p>
<p>If the <em>Appearance</em> value is set to <strong>Appearance.Normal</strong>, then the check box has a typical appearance. If the value is set to Button, the check box appears like a toggle button, which may be toggled to an up or down state.</p>
<p> <img title="dotnet_user_control_8" src="http://jyotsnakalambe.files.wordpress.com/2009/10/dotnet_user_control_8.jpg?w=224&#038;h=241" alt="dotnet_user_control_8" width="224" height="241" /></p>
<p>using System;<br />
using System.Collections;<br />
using System.ComponentModel;<br />
using System.Drawing;<br />
using System.Data;<br />
using System.Windows.Forms;</p>
<p>namespace Akadia<br />
{<br />
    namespace ToggleButton<br />
    {<br />
        // The ToggleButton class is inherited from the<br />
        // System.Windows.Forms.CheckBox Class<br />
        public class ToggleButton : <strong>System.Windows.Forms.CheckBox</strong><br />
        {<br />
            // Fields<br />
            private string _checkedText;<br />
            private string _uncheckedText;<br />
            private Color _checkedColor;<br />
            private Color _uncheckedColor;<br />
 <br />
            // Constructor<br />
            public ToggleButton()<br />
            {<br />
                // If Appearance value is set to Appearance.Normal,<br />
                // the check box has a typical appearance.<br />
                // If the value is set to Button, the check box appears<br />
                // like a toggle button, which may be toggled to<br />
                // an up or down state.<br />
                this.Appearance = Appearance.Button;<br />
 <br />
                // Set Default toggled Text<br />
                this._checkedText = &#8220;Checked&#8221;;<br />
                this._uncheckedText = &#8220;Unchecked&#8221;;<br />
 <br />
                // Set Default toggled Color<br />
                this._checkedColor = Color.Gray;<br />
                this._uncheckedColor = this.BackColor;<br />
            }<br />
 <br />
            // Public Properties, can be accessed in Property Panel<br />
            public string CheckedText<br />
            {<br />
                get { return this._checkedText; }<br />
                set { this._checkedText = value; }<br />
            }<br />
 <br />
            public string UncheckedText<br />
            {<br />
                get { return this._uncheckedText; }<br />
                set { this._uncheckedText = value; }<br />
            }<br />
 <br />
            public Color CheckedColor<br />
            {<br />
                get { return this._checkedColor; }<br />
                set { this._checkedColor = value; }<br />
            }<br />
 <br />
            public Color UncheckedColor<br />
            {<br />
                get { return this._uncheckedColor; }<br />
                set { this._uncheckedColor = value; }<br />
            }<br />
 <br />
            // When the user clicks a toggle Button, the Text and<br />
            // BackColor properties should be set according to the Checked<br />
            // state of the button. The natural place to do this is<br />
            // the Click event. However, keep in mind that you only<br />
            // want to extend the default Click event supplied with<br />
            // the CheckBox class rather than replacing is. In the .NET<br />
            // Framework documentation, you will be notice that controls<br />
            // typically have a protected OnXXX method that raises each<br />
            // event (where XXX is the name of the event) &#8211; for example<br />
            // the Click event is raised by the OnClick method. The Control<br />
            // call these methods when an event occurs. If you want to<br />
            // extend the Click event, the Trick is therefore to override<br />
            // the OnClick method.<br />
            protected override void OnClick(EventArgs e)<br />
            {<br />
                base.OnClick(e); // Call the CheckBox Baseclass<br />
 <br />
                // Set Text and Color according to the<br />
                // current state<br />
                if (this.Checked)<br />
                {<br />
                    this.Text = this._checkedText;<br />
                    this.BackColor = this._checkedColor;<br />
                }<br />
                else<br />
                {<br />
                    this.Text = this._uncheckedText;<br />
                    this.BackColor = this._uncheckedColor;<br />
                }<br />
            }<br />
        }<br />
    }<br />
}</p>
<p><strong>Using the Toggle Button User Control in a Windows Application</strong><strong> </strong></p>
<p>Create a new Windows Application project named: <em>TestApp</em>. Add a reference to the Toggle Button User Control DLL named: ToggleButton.dll. Now you are ready to customize the Toolbox: Right-Click the Toolbox, .NET Framework Components, Browse, select the ToggleButton.dll.</p>
<p>using System;<br />
using System.Drawing;<br />
using System.Collections;<br />
using System.ComponentModel;<br />
using System.Windows.Forms;<br />
using System.Data;</p>
<p>namespace TestApp<br />
{<br />
    // Test Application for the toggled CheckBox und Button<br />
    public class TestApp : System.Windows.Forms.Form<br />
    {<br />
        <strong>private Akadia.ToggleButton.ToggleButton btnToggle1;<br />
        private Akadia.ToggleButton.ToggleButton btnToggle2;<br />
        private Akadia.ToggleButton.ToggleButton btnToggle3;</strong><br />
        private System.Windows.Forms.Label lblText1;<br />
        private System.Windows.Forms.Label lblText2;<br />
        private Akadia.ToggleButton.ToggleButton btnToggle4;<br />
        private System.ComponentModel.Container components = null;<br />
 <br />
        public TestApp()<br />
        {<br />
            InitializeComponent();<br />
 <br />
            // Set Appearance to CheckBox<br />
            <strong>btnToggle1.Appearance = Appearance.Normal;<br />
            btnToggle2.Appearance = Appearance.Normal;</strong><br />
        }<br />
        &#8230;&#8230;<br />
        private void InitializeComponent()<br />
        {<br />
            <strong>this.btnToggle1 = new Akadia.ToggleButton.ToggleButton();<br />
            this.btnToggle2 = new Akadia.ToggleButton.ToggleButton();<br />
            this.btnToggle3 = new Akadia.ToggleButton.ToggleButton();</strong><br />
            &#8230;..<br />
        }<br />
 <br />
        static void Main()<br />
        {<br />
            Application.Run(new TestApp());<br />
        }<br />
    }<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jyotsnakalambe.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jyotsnakalambe.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jyotsnakalambe.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jyotsnakalambe.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jyotsnakalambe.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jyotsnakalambe.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jyotsnakalambe.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jyotsnakalambe.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jyotsnakalambe.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jyotsnakalambe.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jyotsnakalambe.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jyotsnakalambe.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jyotsnakalambe.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jyotsnakalambe.wordpress.com/224/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=224&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jyotsnakalambe.wordpress.com/2009/10/09/create-custom-control-in-c-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfa10648f43bf7f998c80a1c9f035235?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jyotsnakalambe</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/10/11.jpg?w=300" medium="image">
			<media:title type="html">1</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/10/2.jpg?w=300" medium="image">
			<media:title type="html">2</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/10/3.jpg?w=300" medium="image">
			<media:title type="html">3</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/10/4.jpg?w=300" medium="image">
			<media:title type="html">4</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/10/dotnet_user_control_5.jpg?w=300" medium="image">
			<media:title type="html">dotnet_user_control_5</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/10/dotnet_user_control_7.jpg" medium="image">
			<media:title type="html">dotnet_user_control_7</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/10/dotnet_user_control_8.jpg" medium="image">
			<media:title type="html">dotnet_user_control_8</media:title>
		</media:content>
	</item>
		<item>
		<title>SOCKET PROGRAMMING IN C#.NET</title>
		<link>http://jyotsnakalambe.wordpress.com/2009/09/09/socket-programming-in-c-net/</link>
		<comments>http://jyotsnakalambe.wordpress.com/2009/09/09/socket-programming-in-c-net/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 09:52:15 +0000</pubDate>
		<dc:creator>jyotsnakalambe</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[C#.NET]]></category>

		<guid isPermaLink="false">http://jyotsnakalambe.wordpress.com/?p=214</guid>
		<description><![CDATA[We always Treat Socket Programming as Complex programming but if the concept are clear then it will just like doing ADO.NET code.. here i want to introduce a small example where you will understand the the NAMESPACE and the CLASSES need to do the Socket programming&#8230;.System.NET.Sockets this is the main namespace is needed here&#8230;kindly go through [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=214&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We always Treat Socket Programming as Complex programming but if the concept are clear then it will just like doing ADO.NET code.. here i want to introduce a small example where you will understand the the NAMESPACE and the CLASSES need to do the Socket programming&#8230;.System.NET.Sockets this is the main namespace is needed here&#8230;kindly go through the basic concept about the Socket Programming.. </p>
<p>Inter-Process Communication i.e. the capability of two or more physically connected machines to exchange data, plays a very important role in enterprise software development. TCP/IP is the most common standard adopted for such communication. Under TCP/IP each machine is identified by a unique 4 byte integer referred to as its IP address (usually formatted as 192.168.0.101).</p>
<p>Though IPAddress allows to identify machines in the network, each machine may host multiple applications which use network for data exchange. Under TCP/IP, each network oriented application binds itself to a unique 2 byte integer referred to as its port-number which identifies this application on the machine it is executing. The data transfer takes place in the form of byte bundles called IP Packets or Datagrams. The size of each datagram is 64 KByte and it contains the data to be transferred, the actual size of the data, IP addresses and port-numbers of sender and the prospective receiver. Once a datagram is placed on a network by a machine, it will be received physically by all the other machines but will be accepted only by that machine whose IP address matches with the receiver�s IP address in the packet. Later on, this machine will transfer the packet to an application running on it which is bound to the receiver’s port-number present in the packet.</p>
<p>TCP/IP suite actually offers two different protocols for data exchange. The Transmission Control Protocol (TCP) is a reliable connection oriented protocol while the User Datagram Protocol (UDP) is not very reliable (but fast) connectionless protocol.</p>
<p>This is the simple example I am going to explain here in which the client server communication is takes place through the socket programming. If you need more examples for reference, kindly email me.</p>
<p>First we will create a program for Server Application<br />
Create a console project as “Server”<br />
Add following namespace which are essential for Socket Programming:</p>
<p><span style="color:#3366ff;">using System.Net;<br />
using System.Net.Sockets;</span></p>
<p>Add below code in the main method:</p>
<p style="padding-left:30px;"><span style="color:#3366ff;">static void Main(string[ ] args)<br />
{<br />
try<br />
{<br />
IPAddress ipAd = IPAddress.Parse(&#8220;192.168.10.51&#8243;);<br />
//use local m/c IP address, and use the same in the client<br />
TcpListener myList = new TcpListener(ipAd, 8001);<br />
myList.Start();<br />
Console.WriteLine(&#8220;The server is running at port 8001&#8230;&#8221;);<br />
Console.WriteLine(&#8220;The local End point is :&#8221; + myList.LocalEndpoint);<br />
Console.WriteLine(&#8220;Waiting for a connection&#8230;..&#8221;);<br />
Socket s = myList.AcceptSocket();<br />
Console.WriteLine(&#8220;Connection accepted from &#8221; +<br />
s.RemoteEndPoint);<br />
byte[] b = new byte[100];<br />
int k = s.Receive(b);<br />
Console.WriteLine(&#8220;Recieved&#8230;&#8221;);<br />
for (int i = 0; i &lt; k; i++)<br />
Console.Write(Convert.ToChar(b[i]));<br />
ASCIIEncoding asen = new ASCIIEncoding();<br />
s.Send(asen.GetBytes(&#8220;The string was recieved by the server.&#8221;));<br />
Console.WriteLine(&#8220;\\nSent Acknowledgement&#8221;);<br />
s.Close();<br />
myList.Stop();<br />
}<br />
catch (Exception e)<br />
{<br />
Console.WriteLine(&#8220;Error&#8230;.. &#8221; + e.Message);<br />
}<br />
 Console.ReadLine();<br />
}</span></p>
<p style="padding-left:30px;"><span style="color:#3366ff;"><img class="aligncenter size-medium wp-image-215" title="Chatserver" src="http://jyotsnakalambe.files.wordpress.com/2009/09/chatserver.jpg?w=442&#038;h=346" alt="Chatserver" width="442" height="346" /></span></p>
<p>Create a console project as “Client”, Add following namespace which are essential for Socket Programming:</p>
<p><span style="color:#0000ff;"> using System.Net;</span></p>
<p><span style="color:#0000ff;">using System.Net.Sockets;</span></p>
<p>Add below code in the main method:</p>
<p>  <span style="color:#0000ff;">   static void Main(string[] args) </span><span style="color:#0000ff;">{</span></p>
<p><span style="color:#0000ff;">            try</span><span style="color:#0000ff;">     {</span></p>
<p><span style="color:#0000ff;">                TcpClient tcpclnt = new TcpClient();</span></p>
<p><span style="color:#0000ff;">                Console.WriteLine(“Connecting…..”);</span></p>
<p><span style="color:#0000ff;">                tcpclnt.Connect(“192.168.10.51”, 8001);</span></p>
<p><span style="color:#0000ff;"> // use the ipaddress as in the server program</span></p>
<p><span style="color:#0000ff;">                 Console.WriteLine(“Connected”);</span></p>
<p><span style="color:#0000ff;">                Console.Write(“Enter the string to be transmitted : “);</span></p>
<p><span style="color:#0000ff;">                String str = Console.ReadLine();</span></p>
<p><span style="color:#0000ff;">                Stream stm = tcpclnt.GetStream();</span></p>
<p><span style="color:#0000ff;">                ASCIIEncoding asen = new ASCIIEncoding();</span></p>
<p><span style="color:#0000ff;">                byte[] ba = asen.GetBytes(str);</span></p>
<p><span style="color:#0000ff;">                Console.WriteLine(“Transmitting…..”);</span></p>
<p><span style="color:#0000ff;">                stm.Write(ba, 0, ba.Length);</span></p>
<p><span style="color:#0000ff;">                byte[] bb = new byte[100];</span></p>
<p><span style="color:#0000ff;">                int k = stm.Read(bb, 0, 100);</span></p>
<p><span style="color:#0000ff;">                for (int i = 0; i &lt; k; i++)</span></p>
<p><span style="color:#0000ff;">                Console.Write(Convert.ToChar(bb[i]));</span></p>
<p><span style="color:#0000ff;">                tcpclnt.Close();</span></p>
<p><span style="color:#0000ff;">            }</span></p>
<p><span style="color:#0000ff;">            catch (Exception e)      {</span></p>
<p><span style="color:#0000ff;">                Console.WriteLine(“Error….. “ + e.StackTrace);</span></p>
<p><span style="color:#0000ff;">            }</span></p>
<p><span style="color:#0000ff;">            Console.ReadLine();</span></p>
<p><span style="color:#0000ff;">        }</span></p>
<p><span style="color:#0000ff;"><img class="aligncenter size-medium wp-image-216" title="chatclient1" src="http://jyotsnakalambe.files.wordpress.com/2009/09/chatclient1.jpg?w=420&#038;h=311" alt="chatclient1" width="420" height="311" /></span></p>
<p>Now run the server Program you will see the below screen:</p>
<p><img class="aligncenter size-medium wp-image-217" title="run1" src="http://jyotsnakalambe.files.wordpress.com/2009/09/run1.jpg?w=398&#038;h=169" alt="run1" width="398" height="169" /></p>
<p>Now run the Client Program you will see the below screen, now enter the test you want to transfer.</p>
<p> <img class="aligncenter size-medium wp-image-218" title="run2" src="http://jyotsnakalambe.files.wordpress.com/2009/09/run2.jpg?w=396&#038;h=177" alt="run2" width="396" height="177" /></p>
<p>Now see the Server Programm you will receive the text you have transferred from Client Program.</p>
<p><img class="aligncenter size-medium wp-image-219" title="run3" src="http://jyotsnakalambe.files.wordpress.com/2009/09/run3.jpg?w=394&#038;h=170" alt="run3" width="394" height="170" /></p>
<p>This Program you can Run on the remote machine.</p>
<p>Comment  me in case of BUG…..</p>
<p><a href="http://www.paradoxcorp.org/Download/ex1.rar" target="_blank"> You can Download Above Example from Here</a></p>
<p>Thank you.</p>
<p>HAPPY PROGRAMMING….</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jyotsnakalambe.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jyotsnakalambe.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jyotsnakalambe.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jyotsnakalambe.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jyotsnakalambe.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jyotsnakalambe.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jyotsnakalambe.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jyotsnakalambe.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jyotsnakalambe.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jyotsnakalambe.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jyotsnakalambe.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jyotsnakalambe.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jyotsnakalambe.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jyotsnakalambe.wordpress.com/214/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=214&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jyotsnakalambe.wordpress.com/2009/09/09/socket-programming-in-c-net/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfa10648f43bf7f998c80a1c9f035235?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jyotsnakalambe</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/09/chatserver.jpg?w=300" medium="image">
			<media:title type="html">Chatserver</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/09/chatclient1.jpg?w=300" medium="image">
			<media:title type="html">chatclient1</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/09/run1.jpg?w=300" medium="image">
			<media:title type="html">run1</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/09/run2.jpg?w=300" medium="image">
			<media:title type="html">run2</media:title>
		</media:content>

		<media:content url="http://jyotsnakalambe.files.wordpress.com/2009/09/run3.jpg?w=300" medium="image">
			<media:title type="html">run3</media:title>
		</media:content>
	</item>
		<item>
		<title>Introduction to Neural Networks for C#</title>
		<link>http://jyotsnakalambe.wordpress.com/2009/09/07/introduction-to-neural-networks-for-c/</link>
		<comments>http://jyotsnakalambe.wordpress.com/2009/09/07/introduction-to-neural-networks-for-c/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 09:05:27 +0000</pubDate>
		<dc:creator>jyotsnakalambe</dc:creator>
				<category><![CDATA[Neural Network Programming in .NET]]></category>

		<guid isPermaLink="false">http://jyotsnakalambe.wordpress.com/?p=210</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=210&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<span class='embed-youtube' style='text-align:center; display:block;'><object width='468' height='294'><param name='movie' value='http://www.youtube.com/v/kgxzMFJNzHs?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' /> <param name='allowfullscreen' value='true' /> <param name='wmode' value='opaque' /> <embed src='http://www.youtube.com/v/kgxzMFJNzHs?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' type='application/x-shockwave-flash' allowfullscreen='true' width='468' height='294' wmode='opaque'></embed> </object></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jyotsnakalambe.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jyotsnakalambe.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jyotsnakalambe.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jyotsnakalambe.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jyotsnakalambe.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jyotsnakalambe.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jyotsnakalambe.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jyotsnakalambe.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jyotsnakalambe.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jyotsnakalambe.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jyotsnakalambe.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jyotsnakalambe.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jyotsnakalambe.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jyotsnakalambe.wordpress.com/210/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=210&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jyotsnakalambe.wordpress.com/2009/09/07/introduction-to-neural-networks-for-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfa10648f43bf7f998c80a1c9f035235?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jyotsnakalambe</media:title>
		</media:content>
	</item>
		<item>
		<title>Make An Advanced Notepad In C#</title>
		<link>http://jyotsnakalambe.wordpress.com/2009/09/07/make-an-advanced-notepad-in-c/</link>
		<comments>http://jyotsnakalambe.wordpress.com/2009/09/07/make-an-advanced-notepad-in-c/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 09:02:41 +0000</pubDate>
		<dc:creator>jyotsnakalambe</dc:creator>
				<category><![CDATA[C#.NET]]></category>

		<guid isPermaLink="false">http://jyotsnakalambe.wordpress.com/?p=208</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=208&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<span class='embed-youtube' style='text-align:center; display:block;'><object width='468' height='294'><param name='movie' value='http://www.youtube.com/v/KUNlwr5AB60?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' /> <param name='allowfullscreen' value='true' /> <param name='wmode' value='opaque' /> <embed src='http://www.youtube.com/v/KUNlwr5AB60?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' type='application/x-shockwave-flash' allowfullscreen='true' width='468' height='294' wmode='opaque'></embed> </object></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jyotsnakalambe.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jyotsnakalambe.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jyotsnakalambe.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jyotsnakalambe.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jyotsnakalambe.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jyotsnakalambe.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jyotsnakalambe.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jyotsnakalambe.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jyotsnakalambe.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jyotsnakalambe.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jyotsnakalambe.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jyotsnakalambe.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jyotsnakalambe.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jyotsnakalambe.wordpress.com/208/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=208&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jyotsnakalambe.wordpress.com/2009/09/07/make-an-advanced-notepad-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfa10648f43bf7f998c80a1c9f035235?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jyotsnakalambe</media:title>
		</media:content>
	</item>
		<item>
		<title>C# Network Development Programming</title>
		<link>http://jyotsnakalambe.wordpress.com/2009/09/07/c-network-development-programming/</link>
		<comments>http://jyotsnakalambe.wordpress.com/2009/09/07/c-network-development-programming/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 09:01:41 +0000</pubDate>
		<dc:creator>jyotsnakalambe</dc:creator>
				<category><![CDATA[Neural Network Programming in .NET]]></category>

		<guid isPermaLink="false">http://jyotsnakalambe.wordpress.com/?p=202</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=202&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<span class='embed-youtube' style='text-align:center; display:block;'><object width='468' height='294'><param name='movie' value='http://www.youtube.com/v/Igmx19hPW2c?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' /> <param name='allowfullscreen' value='true' /> <param name='wmode' value='opaque' /> <embed src='http://www.youtube.com/v/Igmx19hPW2c?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' type='application/x-shockwave-flash' allowfullscreen='true' width='468' height='294' wmode='opaque'></embed> </object></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jyotsnakalambe.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jyotsnakalambe.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jyotsnakalambe.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jyotsnakalambe.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jyotsnakalambe.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jyotsnakalambe.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jyotsnakalambe.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jyotsnakalambe.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jyotsnakalambe.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jyotsnakalambe.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jyotsnakalambe.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jyotsnakalambe.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jyotsnakalambe.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jyotsnakalambe.wordpress.com/202/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=202&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jyotsnakalambe.wordpress.com/2009/09/07/c-network-development-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfa10648f43bf7f998c80a1c9f035235?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jyotsnakalambe</media:title>
		</media:content>
	</item>
		<item>
		<title>Reading &amp; Writing Barcodes</title>
		<link>http://jyotsnakalambe.wordpress.com/2009/08/27/reading-writing-barcodes/</link>
		<comments>http://jyotsnakalambe.wordpress.com/2009/08/27/reading-writing-barcodes/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 07:28:45 +0000</pubDate>
		<dc:creator>jyotsnakalambe</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jyotsnakalambe.wordpress.com/?p=192</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=192&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<span class='embed-youtube' style='text-align:center; display:block;'><object width='468' height='294'><param name='movie' value='http://www.youtube.com/v/JQAtJFbvlRw?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' /> <param name='allowfullscreen' value='true' /> <param name='wmode' value='opaque' /> <embed src='http://www.youtube.com/v/JQAtJFbvlRw?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' type='application/x-shockwave-flash' allowfullscreen='true' width='468' height='294' wmode='opaque'></embed> </object></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jyotsnakalambe.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jyotsnakalambe.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jyotsnakalambe.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jyotsnakalambe.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jyotsnakalambe.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jyotsnakalambe.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jyotsnakalambe.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jyotsnakalambe.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jyotsnakalambe.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jyotsnakalambe.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jyotsnakalambe.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jyotsnakalambe.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jyotsnakalambe.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jyotsnakalambe.wordpress.com/192/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=192&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jyotsnakalambe.wordpress.com/2009/08/27/reading-writing-barcodes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfa10648f43bf7f998c80a1c9f035235?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jyotsnakalambe</media:title>
		</media:content>
	</item>
		<item>
		<title>NEW RELEASE &#8220;.NET FRAMEWORK 4.0&#8243; FEATURES</title>
		<link>http://jyotsnakalambe.wordpress.com/2009/08/14/new-release-net-framework-4-0-features/</link>
		<comments>http://jyotsnakalambe.wordpress.com/2009/08/14/new-release-net-framework-4-0-features/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 06:53:54 +0000</pubDate>
		<dc:creator>jyotsnakalambe</dc:creator>
				<category><![CDATA[.NET Framework]]></category>

		<guid isPermaLink="false">http://jyotsnakalambe.wordpress.com/?p=178</guid>
		<description><![CDATA[This post contains information about key features and improvements in the .NET Framework version 4 Beta 1. This topic does not provide comprehensive information about all new features and is subject to change.The new features and improvements are described in the following sections: Content : 1 Common Language Runtime (CLR) 2 Base Class Libraries 3 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=178&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="margin-bottom:0;">This post contains information about key features and improvements in the .NET Framework version 4 Beta 1. This topic does not provide comprehensive information about all new features and is subject to change.The new features and improvements are described in the following sections:</p>
<p><strong>Content :</strong></p>
<p>1 Common Language Runtime (CLR)<br />
2 Base Class Libraries<br />
3 Networking<br />
4 Web<br />
5 Client<br />
6 Data<br />
7 Communications<br />
8 Workflow</p>
<p><strong><span style="color:#eb613d;">1. Common Language Runtime (CLR)</span></strong><span style="color:#eb613d;"> </span></p>
<p>The following sections describe new features in security, parallel computing, performance and diagnostics, dynamic language runtime, and other CLR-related technologies.</p>
<h5>* Security</h5>
<p>The .NET Framework 4 Beta 1 provides simplifications, improvements, and expanded capabilities in<br />
the security model. For more information, see <a href="http://msdn.microsoft.com/en-us/library/dd233103(VS.100).aspx">Security Changes in the .NET Framework 4</a>.</p>
<h5>* Parallel Computing</h5>
<p>The .NET Framework 4 Beta 1 introduces a new programming model for writing multithreaded and asynchronous code that greatly simplifies the work of application and library developers. The new model enables developers to write efficient, fine-grained, and scalable parallel code in a natural idiom without having to work directly with threads or the thread pool. The new <a href="http://msdn.microsoft.com/en-us/library/system.threading.parallel(VS.100).aspx">Parallel</a> and <a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task(VS.100).aspx">Task</a> classes, and other related types, support this new model. Parallel LINQ (PLINQ), which is a parallel implementation of LINQ to Objects, enables similar functionality through declarative syntax. For more information, see <a href="http://msdn.microsoft.com/en-us/library/dd460693(VS.100).aspx">Parallel Programming in the .NET Framework</a>.</p>
<h5>* Performance and Diagnostics</h5>
<p>In addition to the following features, the .NET Framework 4 Beta 1 provides improvements in startup time, working set sizes, and faster performance for multithreaded applications.</p>
<h6><span style="font-size:x-small;">* ETW Events</span></h6>
<p>You can now access the Event Tracing for Windows (ETW) events for diagnostic purposes to improve performance. For more information, see the following topics:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/dd264810(VS.100).aspx">CLR ETW Events</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/dd264809(VS.100).aspx">Using Event Tracing for Windows to Log CLR Events</a></li>
</ul>
<p>Performance Monitor (Perfmon.exe) now enables you to disambiguate multiple applications that use the same name and multiple versions of the common language runtime loaded by a single process. This requires a simple registry modification. For more information, see <a href="http://msdn.microsoft.com/en-us/library/dd537616(VS.100).aspx">Performance Counters and In-Process Side-By-Side Applications</a>.</p>
<h6><span style="font-size:x-small;">* Code Contracts</span></h6>
<p>Code contracts let you specify contractual information that is not represented by a method&#8217;s or type&#8217;s signature alone. The new <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.contracts(VS.100).aspx">System.Diagnostics.Contracts</a> namespace contains classes that provide a language-neutral way to express coding assumptions in the form of pre-conditions, post-conditions, and object invariants. The contracts improve testing with run-time checking, enable static contract verification, and documentation generation.</p>
<p>The applicable scenarios include the following:</p>
<ul>
<li>Perform static bug finding, which enables some bugs to be found without executing the code.</li>
<li>Create guidance for automated testing tools to enhance test coverage.</li>
<li>Create a standard notation for code behavior, which provides more information for documentation.</li>
</ul>
<h6><span style="font-size:x-small;">* Lazy Initialization</span></h6>
<p>With lazy initialization, the memory for an object is not allocated until it is needed. Lazy initialization can improve performance by spreading object allocations evenly across the lifetime of a program. You can enable lazy initialization for any custom type by wrapping the type inside a <a href="http://msdn.microsoft.com/en-us/library/dd642331(VS.100).aspx">System..::.Lazy&lt;(Of &lt;(T&gt;)&gt;)</a> class.</p>
<h5>* Dynamic Language Runtime</h5>
<p>The dynamic language runtime (DLR) is a new runtime environment that adds a set of services for dynamic languages to the CLR. The DLR makes it easier to develop dynamic languages to run on the .NET Framework and to add dynamic features to statically typed languages. To support the DLR, the new <a href="http://msdn.microsoft.com/en-us/library/system.dynamic(VS.100).aspx">System.Dynamic</a> namespace is added to the .NET Framework. In addition, several new classes that support the .NET Framework infrastructure are added to the <a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices(VS.100).aspx">System.Runtime.CompilerServices</a> namespace. For more information, see <a href="http://msdn.microsoft.com/en-us/library/dd233052(VS.100).aspx">Dynamic Language Runtime Overview</a>.</p>
<h5>* In-Process Side-by-Side Execution</h5>
<p>In-process side-by-side hosting enables an application to load and activate multiple versions of the common language runtime (CLR) in the same process. For example, you can run applications that are based on the .NET Framework 2.0 SP1 and applications that are based on .NET Framework 4 Beta 1 in the same process. Older components continue to use the same CLR version, and new components use the new CLR version. For more information, see <a href="http://msdn.microsoft.com/en-us/library/dd233120(VS.100).aspx">Hosting Changes in the .NET Framework 4</a>.</p>
<h5>* Interoperability</h5>
<p>New interoperability features and improvements include the following:</p>
<ul>
<li>You no longer have to use primary interop assemblies (PIAs). Compilers embed the parts of the interop assemblies that the add-ins actually use, and type safety is ensured by the common language runtime.</li>
<li>You can use the <a href="http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.icustomqueryinterface(VS.100).aspx">System.Runtime.InteropServices..::.ICustomQueryInterface</a> interface to create a customized, managed code implementation of the <a href="http://go.microsoft.com/fwlink/?LinkID=144867">IUnknown::QueryInterface</a> method. Applications can use the customized implementation to return a specific interface (except IUnknown) for a particular interface ID.</li>
</ul>
<h5>* Profiling</h5>
<p>In the .NET Framework 4 Beta 1, you can attach profilers to a running process at any point, perform the requested profiling tasks, and then detach. For more information, see the [IClrProfiling::AttachProfiler]<a href="http://msdn.microsoft.com/en-us/library/dd695930(VS.100).aspx">IClrProfiling Interface::AttachProfiler Method</a> method.</p>
<h5>* Garbage Collection</h5>
<p>The .NET Framework 4 Beta 1 provides background garbage collection; for more information, see the entry <a href="http://go.microsoft.com/fwlink/?LinkId=151482">So, what’s new in the CLR 4.0 GC?</a> in the CLR Garbage Collector blog. </p>
<h5>* Covariance and Contravariance</h5>
<p>Several generic interfaces and delegates now support covariance and contravariance. For more information, see <a href="http://msdn.microsoft.com/en-us/library/dd799517(VS.100).aspx">Covariance and Contravariance in the Common Language Runtime</a>.</p>
<p><strong><span style="color:#eb613d;">2. Base Class Libraries </span></strong></p>
<p>The following sections describe new features in collections and data structures, exception handling, I/O, reflection, threading, and Windows registry.</p>
<h5>* Collections and Data Structures</h5>
<p>Enhancements in this area include the new <a href="http://msdn.microsoft.com/en-us/library/system.numerics.biginteger(VS.100).aspx">System.Numerics..::.BigInteger</a> structure, the <a href="http://msdn.microsoft.com/en-us/library/dd412070(VS.100).aspx">System.Collections.Generic..::.SortedSet&lt;(Of &lt;(T&gt;)&gt;)</a> generic class, and tuples.</p>
<h6><span style="font-size:x-small;">* BigInteger</span></h6>
<p>The new <a href="http://msdn.microsoft.com/en-us/library/system.numerics.biginteger(VS.100).aspx">System.Numerics..::.BigInteger</a> structure is an arbitrary-precision integer data type that supports all the standard integer operations, including bit manipulation. It can be used from any .NET Framework language. In addition, some of the new .NET Framework languages (such as F# and IronPython) have built-in support for this structure.</p>
<h6><span style="font-size:x-small;">* SortedSet Generic Class</span></h6>
<p>The new <a href="http://msdn.microsoft.com/en-us/library/dd412070(VS.100).aspx">System.Collections.Generic..::.SortedSet&lt;(Of &lt;(T&gt;)&gt;)</a> class provides a self-balancing tree that maintains data in sorted order after insertions, deletions, and searches. This class implements the new <a href="http://msdn.microsoft.com/en-us/library/dd412081(VS.100).aspx">System.Collections.Generic..::.ISet&lt;(Of &lt;(T&gt;)&gt;)</a> interface.</p>
<p>The <a href="http://msdn.microsoft.com/en-us/library/bb359438(VS.100).aspx">System.Collections.Generic..::.HashSet&lt;(Of &lt;(T&gt;)&gt;)</a> class also implements the <a href="http://msdn.microsoft.com/en-us/library/dd412081(VS.100).aspx">ISet&lt;(Of &lt;(T&gt;)&gt;)</a> interface.</p>
<h6><span style="font-size:x-small;">* Tuples</span></h6>
<p>A tuple is a simple generic data structure that holds an ordered set of items of heterogeneous types. Tuples are supported natively in languages such as F# and IronPython, but are also easy to use from any .NET Framework language such as C# and Visual Basic. The ..NET Framework 4 Beta 1 adds eight new generic tuple classes, and also a <a href="http://msdn.microsoft.com/en-us/library/system.tuple(VS.100).aspx">Tuple</a> class that contains static factory methods for creating tuples.</p>
<h5><span style="font-size:x-small;">* Exceptions Handling</span></h5>
<p>The .NET Framework 4 Beta 1 class library contains the new <a href="http://msdn.microsoft.com/en-us/library/system.runtime.exceptionservices(VS.100).aspx">System.Runtime.ExceptionServices</a> namespace, and adds the ability to handle corrupted state exceptions. </p>
<h6><span style="font-size:x-small;">* Corrupted State Exceptions</span></h6>
<p>The CLR no longer delivers corrupted state exceptions that occur in the operating system to be handled by managed code, unless you apply the <a href="http://msdn.microsoft.com/en-us/library/system.runtime.exceptionservices.handleprocesscorruptedstateexceptionsattribute(VS.100).aspx">HandleProcessCorruptedStateExceptionsAttribute</a> attribute to the method that handles the corrupted state exception.</p>
<p>Alternatively, you can add the following setting to an application&#8217;s configuration file:</p>
<p>legacyCorruptedStateExceptionsPolicy=true</p>
<h5>* I/O</h5>
<p>The key new features in I/O are efficient file enumerations, memory-mapped files, and improvements in isolated storage and compression.</p>
<h6><span style="font-size:x-small;">* File System Enumeration Improvements</span></h6>
<p>New enumeration methods in the <a href="http://msdn.microsoft.com/en-us/library/system.io.directory(VS.100).aspx">Directory</a> and <a href="http://msdn.microsoft.com/en-us/library/system.io.directoryinfo(VS.100).aspx">DirectoryInfo</a> classes return <a href="http://msdn.microsoft.com/en-us/library/9eekhta0(VS.100).aspx">IEnumerable&lt;(Of &lt;(T&gt;)&gt;)</a> collections instead of arrays. These methods are more efficient than the array-based methods, because they do not have to allocate a (potentially large) array and you can access the first results immediately instead of waiting for the complete enumeration to occur.</p>
<p>There are also new methods in the static <a href="http://msdn.microsoft.com/en-us/library/system.io.file(VS.100).aspx">File</a> class that read and write lines from files by using <a href="http://msdn.microsoft.com/en-us/library/9eekhta0(VS.100).aspx">IEnumerable&lt;(Of &lt;(T&gt;)&gt;)</a> collections. These methods are useful in LINQ scenarios where you may want to quickly and efficiently query the contents of a text file and write out the results to a log file without allocating any arrays.</p>
<h6><span style="font-size:x-small;">* Memory-Mapped Files</span></h6>
<p>The new <a href="http://msdn.microsoft.com/en-us/library/system.io.memorymappedfiles(VS.100).aspx">System.IO.MemoryMappedFiles</a> namespace provides memory mapping functionality, which is available in Windows. You can use memory-mapped files to edit very large files and to create shared memory for inter-process communication. The new <a href="http://msdn.microsoft.com/en-us/library/system.io.unmanagedmemoryaccessor(VS.100).aspx">System.IO..::.UnmanagedMemoryAccessor</a> class enables random access to unmanaged memory, similar to how <a href="http://msdn.microsoft.com/en-us/library/system.io.unmanagedmemorystream(VS.100).aspx">System.IO..::.UnmanagedMemoryStream</a> enables sequential access to unmanaged memory.</p>
<h6><span style="font-size:x-small;">* Isolated Storage Improvements</span></h6>
<p>Partial-trust applications, such as Windows Presentation Framework (WPF) browser applications (XBAPs) and ClickOnce partial-trust applications, now have the same capabilities in the .NET Framework as they do in Silverlight. The default quota size is doubled, and applications can prompt the user to approve or reject a request to increase the quota. The <a href="http://msdn.microsoft.com/en-us/library/system.io.isolatedstorage.isolatedstoragefile(VS.100).aspx">System.IO.IsolatedStorage..::.IsolatedStorageFile</a> class contains new members to manage the quota and to make working with files and directories easier.</p>
<h6><span style="font-size:x-small;">* Compression Improvements</span></h6>
<p>The compression algorithms for the <a href="http://msdn.microsoft.com/en-us/library/system.io.compression.deflatestream(VS.100).aspx">System.IO.Compression..::.DeflateStream</a> and <a href="http://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream(VS.100).aspx">System.IO.Compression..::.GZipStream</a> classes have improved so that data that is already compressed is no longer inflated. This results in much better compression ratios. Also, the 4-gigabyte size restriction for compressing streams has been removed.</p>
<h5>* Reflection</h5>
<p>The .NET Framework 4 Beta 1 provides the capability to monitor the performance of your application domains.</p>
<h6><span style="font-size:x-small;">* Application Domain Resource Monitoring</span></h6>
<p>Until now, there has been no way to determine whether a particular application domain is affecting other application domains, because the operating system APIs and tools, such as the Windows Task Manager, were precise only to the process level. Starting with the .NET Framework 4 Beta 1, you can get processor usage and memory usage estimates per application domain.</p>
<p>Application domain resource monitoring is available through the managed <a href="http://msdn.microsoft.com/en-us/library/system.appdomain(VS.100).aspx">AppDomain</a> class, native hosting APIs, and event tracing for Windows (ETW). When this feature has been enabled, it collects statistics on all application domains in the process for the life of the process.</p>
<p>For more information, see the <a href="http://msdn.microsoft.com/en-us/library/dd572102(VS.100).aspx">&lt;appDomainResourceMonitoring&gt; Element</a>, and the following properties in the <a href="http://msdn.microsoft.com/en-us/library/system.appdomain(VS.100).aspx">AppDomain</a> class:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/system.appdomain.monitoringisenabled(VS.100).aspx">MonitoringIsEnabled</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/system.appdomain.monitoringsurvivedmemorysize(VS.100).aspx">MonitoringSurvivedMemorySize</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/system.appdomain.monitoringsurvivedprocessmemorysize(VS.100).aspx">MonitoringSurvivedProcessMemorySize</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/system.appdomain.monitoringtotalallocatedmemorysize(VS.100).aspx">MonitoringTotalAllocatedMemorySize</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/system.appdomain.monitoringtotalprocessortime(VS.100).aspx">MonitoringTotalProcessorTime</a></li>
</ul>
<h5>* 64-bit View and Other Registry Improvements</h5>
<p>Windows registry improvements include the following:</p>
<ul>
<li>Ability to specify a 32-bit or 64-bit view of the registry with the <a href="http://msdn.microsoft.com/en-us/library/microsoft.win32.registryview(VS.100).aspx">Microsoft.Win32..::.RegistryView</a> enumeration when you open base keys.</li>
<li>the new <a href="http://msdn.microsoft.com/en-us/library/microsoft.win32.registryoptions(VS.100).aspx">Microsoft.Win32..::.RegistryOptions</a> enumeration, which lets you specify a volatile registry key that does not persist after the computer restarts.</li>
</ul>
<h5>* Threading</h5>
<p>General threading improvements include the following:</p>
<ul>
<li>The new <a href="http://msdn.microsoft.com/en-us/library/dd289498(VS.100).aspx">Monitor..::.Enter(Object, Boolean%)</a> method overload takes a Boolean reference and atomically sets it to true only if the monitor is successfully entered.</li>
<li>You can use the <a href="http://msdn.microsoft.com/en-us/library/system.threading.thread.yield(VS.100).aspx">Thread..::.Yield</a> method to have the calling thread yield execution to another thread that is ready to run on the current processor.</li>
</ul>
<p>The following sections describe new threading features.</p>
<h6><span style="font-size:x-small;">* Unified Model for Cancellation</span></h6>
<p>The .NET Framework 4 Beta 1 provides a new unified model for cancellation of asynchronous operations. The new <a href="http://msdn.microsoft.com/en-us/library/system.threading.cancellationtokensource(VS.100).aspx">System.Threading..::.CancellationTokenSource</a> class is used to create a <a href="http://msdn.microsoft.com/en-us/library/system.threading.cancellationtoken(VS.100).aspx">CancellationToken</a> that may be passed to any number of operations on multiple threads. By calling Cancel()()() on the token source object, the <a href="http://msdn.microsoft.com/en-us/library/system.threading.cancellationtokensource.iscancellationrequested(VS.100).aspx">IsCancellationRequested</a> property on the token is set to true and the token’s wait handle is signaled, at which time any registered actions with the token are invoked. Any object that has a reference to that token can monitor the value of that property and respond as appropriate.</p>
<h6><span style="font-size:x-small;">* Thread-Safe Collection Classes</span></h6>
<p>The new <a href="http://msdn.microsoft.com/en-us/library/system.collections.concurrent(VS.100).aspx">System.Collections.Concurrent</a> namespace introduces several new thread-safe collection classes that provide lock-free access to items whenever useful, and fine-grained locking when locks are appropriate. The use of these classes in multi-threaded scenarios should improve performance over collection types such as <a href="http://msdn.microsoft.com/en-us/library/system.collections.arraylist(VS.100).aspx">ArrayList</a>, and <a href="http://msdn.microsoft.com/en-us/library/6sh2ey19(VS.100).aspx">List&lt;(Of &lt;(T&gt;)&gt;)</a>.</p>
<h6><span style="font-size:x-small;">* Synchronization Primitives</span></h6>
<p>New synchronization primitives in the <a href="http://msdn.microsoft.com/en-us/library/system.threading(VS.100).aspx">System.Threading</a> namespace enable fine-grained concurrency and faster performance by avoiding expensive locking mechanisms. The <a href="http://msdn.microsoft.com/en-us/library/system.threading.barrier(VS.100).aspx">Barrier</a> class enables multiple threads to work on an algorithm cooperatively by providing a point at which each task can signal its arrival and then block until the other participants in the barrier have arrived. The <a href="http://msdn.microsoft.com/en-us/library/system.threading.countdownevent(VS.100).aspx">CountdownEvent</a> class simplifies fork and join scenarios by providing an easy rendezvous mechanism. The <a href="http://msdn.microsoft.com/en-us/library/system.threading.manualreseteventslim(VS.100).aspx">ManualResetEventSlim</a> class is a lock-free synchronization primitive similar to the <a href="http://msdn.microsoft.com/en-us/library/system.threading.manualresetevent(VS.100).aspx">ManualResetEvent</a> class. <a href="http://msdn.microsoft.com/en-us/library/system.threading.manualreseteventslim(VS.100).aspx">ManualResetEventSlim</a> is lighter weight but can only be used for intra-process communication. The <a href="http://msdn.microsoft.com/en-us/library/system.threading.semaphoreslim(VS.100).aspx">SemaphoreSlim</a> class is a lightweight synchronization primitive that limits the number of threads that can access a resource or a pool of resources at the same time; it can be used only for intra-process communication. The <a href="http://msdn.microsoft.com/en-us/library/system.threading.spinlock(VS.100).aspx">SpinLock</a> class is a mutual exclusion lock primitive that causes the thread that is trying to acquire the lock to wait in a loop, or spin, until the lock becomes available. The <a href="http://msdn.microsoft.com/en-us/library/system.threading.spinwait(VS.100).aspx">SpinWait</a> class is a small, lightweight type that will spin for a time and eventually put the thread into a wait state if the spin count is exceeded.</p>
<p><span style="color:#eb613d;"><strong>3. Networking </strong></span></p>
<p>Enhancements have been made that affect how integrated Windows authentication is handled by the <a href="http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest(VS.100).aspx">HttpWebRequest</a>, <a href="http://msdn.microsoft.com/en-us/library/system.net.httplistener(VS.100).aspx">HttpListener</a>, <a href="http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient(VS.100).aspx">SmtpClient</a>, <a href="http://msdn.microsoft.com/en-us/library/system.net.security.sslstream(VS.100).aspx">SslStream</a>, <a href="http://msdn.microsoft.com/en-us/library/system.net.security.negotiatestream(VS.100).aspx">NegotiateStream</a>, and related classes in the <a href="http://msdn.microsoft.com/en-us/library/system.net(VS.100).aspx">System.Net</a> and related namespaces. Support was added for extended protection to enhance security. The changes to support extended protection are available only for applications on Windows 7. The extended protection features are not available on earlier versions of Windows. For more information, see<a href="http://msdn.microsoft.com/en-us/library/dd582691(VS.100).aspx">Integrated Windows Authentication with Extended Protection</a>.</p>
<p><span style="color:#eb613d;"><strong>4. Web </strong></span></p>
<p>The following sections describe new features in ASP.NET core services, Web Forms, Dynamic Data, and Visual Web Developer.</p>
<h5>* ASP.NET Core Services</h5>
<p>ASP.NET introduces several features that improve core ASP.NET services, Web Forms, Dynamic Data, and Visual Web Developer. For more information, see <a href="http://go.microsoft.com/fwlink/?LinkId=116273">What’s New in ASP.NET and Web Development</a>.</p>
<h5>* ASP.NET Web Forms</h5>
<p>Web Forms has been a core feature in ASP.NET since the release of ASP.NET 1.0. Many enhancements have been made in this area for ASP.NET 4, including the following:</p>
<ul>
<li>The ability to set meta tags.</li>
<li>More control over view state.</li>
<li>Easier ways to work with browser capabilities.</li>
<li>Support for using ASP.NET routing with Web Forms.</li>
<li>More control over generated IDs.</li>
<li>The ability to persist selected rows in data controls.</li>
<li>More control over rendered HTML in the FormView and ListView controls.</li>
<li>Filtering support for data source controls.</li>
</ul>
<h5>* Dynamic Data</h5>
<p>For ASP.NET 4, Dynamic Data has been enhanced to give developers even more power for quickly building data-driven Web sites. This includes the following:</p>
<ul>
<li>Automatic validation that is based on constraints defined in the data model.</li>
<li>The ability to easily change the markup that is generated for fields in the GridView and DetailsView controls by using field templates that are part of your Dynamic Data project.</li>
</ul>
<h5>* Visual Web Developer Enhancements</h5>
<p>The Web page designer in Visual Studio 2010 has been enhanced for better CSS compatibility, includes additional support for HTML and ASP.NET markup code examples, and features a redesigned version of IntelliSense for JScript. In addition, two new deployment features called Web packaging and One-Click Publish make deploying Web applications easier.</p>
<p><span style="color:#eb613d;"><strong>5. Client </strong></span></p>
<p>The following sections describe new features in Windows Presentation Foundation (WPF) and Managed Extensibility Framework (MEF).</p>
<h5>* Windows Presentation Foundation</h5>
<p>In the .NET Framework 4 Beta 1, Windows Presentation Foundation (WPF) contains changes and improvements in many areas. This includes controls, graphics, and XAML.</p>
<p>For more information, see <a href="http://msdn.microsoft.com/en-us/library/bb613588(VS.100).aspx">What&#8217;s New in Windows Presentation Foundation Version 4</a>.</p>
<h5>* Managed Extensibility Framework</h5>
<p>The Managed Extensibility Framework (MEF) is a new library in the .NET Framework 4 Beta 1 that enables you to build extensible and composable applications. MEF enables application developers to specify points where an application can be extended, expose services to offer to other extensible applications, and create parts for consumption by extensible applications. It also enables easy discoverability of available parts based on metadata, without the need to load the assemblies for the parts.</p>
<p>For more information, see <a href="http://go.microsoft.com/fwlink/?LinkId=144282">Managed Extensibility Framework</a>. For a list of the MEF types, see the System.ComponentModel.Composition namespace.</p>
<p><span style="color:#eb613d;"><strong>6. Data </strong></span></p>
<p>For more information, see <a href="http://msdn.microsoft.com/en-us/library/ex6y04yf(VS.100).aspx">What&#8217;s New in ADO.NET</a>.</p>
<h6><span style="font-size:x-small;">* Expression Trees</span></h6>
<p>Expression trees are extended with new types that represent control flow, for example, <a href="http://msdn.microsoft.com/en-us/library/system.linq.expressions.loopexpression(VS.100).aspx">LoopExpression</a> and <a href="http://msdn.microsoft.com/en-us/library/system.linq.expressions.tryexpression(VS.100).aspx">TryExpression</a>. These new types are used by the dynamic language runtime (DLR) and not used by LINQ.</p>
<p><span style="color:#eb613d;"><strong>7. Communications </strong></span></p>
<p>Windows Communication Foundation (WCF) provides the new features and enhancements described in the following sections.</p>
<h5>* Support for WS-Discovery</h5>
<p>The Service Discovery feature enables client applications to dynamically discover service addresses at run time in an interoperable way using WS-Discovery. The WS-Discovery specification outlines the message-exchange patterns (MEPs) required for performing lightweight discovery of services, both by multicast (ad hoc) and unicast (using a network resource).</p>
<h5>* Standard Endpoints</h5>
<p>Standard endpoints are pre-defined endpoints that have one or more of their properties (address, binding, contract) fixed. For example, all metadata exchange endpoints specify <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.imetadataexchange(VS.100).aspx">IMetadataExchange</a> as their contract, so there is no need for a developer to have to specify the contract. Therefore, the standard MEX endpoint has a fixed <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.imetadataexchange(VS.100).aspx">IMetadataExchange</a> contract.</p>
<h5>* Workflow Services</h5>
<p>With the introduction of a set of messaging activities, it is easier than ever to implement workflows that send and receive data. These messaging activities enable you to model complex message exchange patterns that go outside the traditional send/receive or RPC-style method invocation.</p>
<ol>
<li><span style="color:#eb613d;"><strong>Workflow</strong></span></li>
</ol>
<p>Windows Workflow Foundation (WF) in .NET Framework 4 Beta 1 changes several development paradigms from earlier versions. Workflows are now easier to create, execute, and maintain.</p>
<h5>* Workflow Activity Model</h5>
<p>The activity is now the base unit of creating a workflow, instead of using the <a href="http://msdn.microsoft.com/en-us/library/system.workflow.activities.sequentialworkflowactivity(VS.100).aspx">SequentialWorkflowActivity</a> or <a href="http://msdn.microsoft.com/en-us/library/system.workflow.activities.statemachineworkflowactivity(VS.100).aspx">StateMachineWorkflowActivity</a> classes. The <a href="http://msdn.microsoft.com/en-us/library/system.activities.workflowelement(VS.100).aspx">WorkflowElement</a> class provides the base abstraction of workflow behavior. Activity authors implement <a href="http://msdn.microsoft.com/en-us/library/system.activities.workflowelement(VS.100).aspx">WorkflowElement</a> objects imperatively when they have to use the breadth of the runtime. The <a href="http://msdn.microsoft.com/en-us/library/system.activities.activity(VS.100).aspx">Activity</a> class is a data-driven <a href="http://msdn.microsoft.com/en-us/library/system.activities.workflowelement(VS.100).aspx">WorkflowElement</a> object where activity authors express new behaviors declaratively in terms of other activity objects.</p>
<h5>* Richer Composite Activity Options</h5>
<p>The Flowchart class is a powerful new control flow activity that enables authors to construct process flows more naturally. Procedural workflows benefit from new flow-control activities that model traditional flow-control structures, such as TryCatch and Switch.</p>
<h5>* Expanded Built-in Activity Library</h5>
<p>New features of the activity library include the following:</p>
<ul>
<li>Data access activities for interacting with ODBC data sources.</li>
<li>New flow control activities such as DoWhile, ForEach, and ParallelForEach.</li>
<li>Activities for interacting with PowerShell and SharePoint.</li>
</ul>
<h5>* Enhanced Persistence and Unloading</h5>
<p>Workflow state data can be explicitly persisted by using the Persist activity. A host can persist a <a href="http://msdn.microsoft.com/en-us/library/system.activities.workflowinstance(VS.100).aspx">WorkflowInstance</a> without unloading it. A workflow can specify no-persist zones when working with data that cannot be persisted so that persistence is postponed until the no-persist zone exits.</p>
<h5>* Improved Ability to Extend WF Designer Experience</h5>
<p>The new WF Designer is built on Windows Presentation Foundation (WPF) and provides an easier model to use when re-hosting the WF Designer outside Visual Studio. It also provides easier mechanisms for creating custom activity designers. For more information, see <a href="http://msdn.microsoft.com/en-us/library/dd489440(VS.100).aspx">Extending the Workflow Designer</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jyotsnakalambe.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jyotsnakalambe.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jyotsnakalambe.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jyotsnakalambe.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jyotsnakalambe.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jyotsnakalambe.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jyotsnakalambe.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jyotsnakalambe.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jyotsnakalambe.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jyotsnakalambe.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jyotsnakalambe.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jyotsnakalambe.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jyotsnakalambe.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jyotsnakalambe.wordpress.com/178/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jyotsnakalambe.wordpress.com&amp;blog=4975453&amp;post=178&amp;subd=jyotsnakalambe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jyotsnakalambe.wordpress.com/2009/08/14/new-release-net-framework-4-0-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfa10648f43bf7f998c80a1c9f035235?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jyotsnakalambe</media:title>
		</media:content>
	</item>
	</channel>
</rss>
