<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FVN Tech Blog &#187; dotNET</title>
	<atom:link href="http://blog.feuvan.net/tag/dotnet/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.feuvan.net</link>
	<description>Advertisement Platform &#124; Mobile &#124; Interoperability &#124; Coding in C#, JavaScript, Obj-C, PHP &#124; Linux, Mac OSX, Windows Server Backend &#124; Misc ...</description>
	<lastBuildDate>Mon, 16 Jan 2012 14:53:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Peak at C# 4.0: optional parameter, named parameter and method resolution</title>
		<link>http://blog.feuvan.net/2010/04/13/231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html</link>
		<comments>http://blog.feuvan.net/2010/04/13/231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html#comments</comments>
		<pubDate>Mon, 12 Apr 2010 18:52:47 +0000</pubDate>
		<dc:creator>feuvan</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[dotNET]]></category>

		<guid isPermaLink="false">http://blog.feuvan.net/2010/04/13/231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html</guid>
		<description><![CDATA[Optional and named parameter is an awesome feature introduced in C# 4.0. Now C# combines some fancy features from dynamic languages like Python again (var knows why I say again. And the more dynamic dynamic is another topic, LOL). Please &#8230; <a href="http://blog.feuvan.net/2010/04/13/231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Optional and named parameter is an awesome feature introduced in C# 4.0. Now C# combines some fancy features from dynamic languages like Python again (<strong>var</strong> knows why I say again. And the more dynamic <strong>dynamic</strong> is another topic, LOL).</p>
<p>Please note the “NEW:” comment for optional parameter declaration and named parameter assignment.</p>
<blockquote><p><code lang="C#"> </code></p>
<p>using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Text;</p>
<p>namespace ConsoleApp<br />
{<br />
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
var top = new TestOptionalParameter();<br />
double d = top.Demo(0);  // #1</p>
<p>// int d = top.Demo(0, s: “test”); // NEW: named parameter.<br />
}<br />
}</p>
<p>class TestOptionalParameter<br />
{<br />
public int Demo(int i, string s = &#8220;demo purpose&#8221;) // #2 NEW: optional parameter declaration<br />
{<br />
Console.WriteLine(&#8220;int Demo(int i, string s = \&#8221;demo purpose\&#8221;)&#8221;);<br />
return 0;<br />
}</p>
<p>public double Demo(int i) // #3<br />
{<br />
Console.WriteLine(&#8220;double Demo(int i)&#8221;);<br />
return 0;<br />
}<br />
}<br />
}</p></blockquote>
<p>But when combined with method name resolution, unconsidered condition may occur.</p>
<p>Try these changes and you will realize what you’ll pay for fancy new features: (Play it with VS2010. I don’t want to copy and paste several times and just modify one place of return type or variable value.)</p>
<table border="1" cellspacing="0" cellpadding="2" width="743">
<tbody>
<tr>
<th width="180" valign="top">Change #1</th>
<th width="151" valign="top">Change #2</th>
<th width="197" valign="top">Change #3</th>
<th width="213" valign="top">Why?</th>
</tr>
<tr>
<td width="184" valign="top"></td>
<td width="155" valign="top"></td>
<td width="195" valign="top"></td>
<td width="211" valign="top">Works as expected. Matches 2nd Demo method.</td>
</tr>
<tr>
<td width="185" valign="top">change double to int</td>
<td width="158" valign="top"></td>
<td width="194" valign="top"></td>
<td width="210" valign="top">Easy to understand, the 1st Demo matches better. (Fully match in/out/return parameter, though there’s an optional parameter not specified when invoking the method)</td>
</tr>
<tr>
<td width="185" valign="top">add named parameter. change it to<br />
double d = top.Demo(0, s: “test”);</td>
<td width="160" valign="top"></td>
<td width="193" valign="top"></td>
<td width="210" valign="top">still the 1st Demo matches better. Now named parameter takes place.</td>
</tr>
<tr>
<td width="186" valign="top"></td>
<td width="161" valign="top"></td>
<td width="193" valign="top">change int to double</td>
<td width="210" valign="top">Match 1st. No implicit conversion required for parameter.</td>
</tr>
<tr>
<td width="186" valign="top">change 0 to 0.0</td>
<td width="161" valign="top"></td>
<td width="193" valign="top"></td>
<td width="210" valign="top">Compile error. Explicit conversion required.</td>
</tr>
<tr>
<td width="186" valign="top">change 0 to 0.0</td>
<td width="161" valign="top">change int to double</td>
<td width="193" valign="top"></td>
<td width="210" valign="top">Match 1st. No implicit conversion required for parameter.</td>
</tr>
<tr>
<td width="186" valign="top">Whenever add 2nd string parameter, named with “s” or unnamed.</td>
<td width="161" valign="top"></td>
<td width="193" valign="top"></td>
<td width="210" valign="top">Match 1st.</td>
</tr>
<tr>
<td width="186" valign="top"></td>
<td width="161" valign="top"></td>
<td width="193" valign="top"></td>
<td width="210" valign="top"></td>
</tr>
</tbody>
</table>
<p>Some looks-hard-but-actually-straightforward-and-ideal conclusion:</p>
<ol>
<li>Whenever named or unnamed parameter used, method don’t accept these parameters will be out.</li>
<li>If implicit conversion is NOT required, traditional method resolution goes first, then goes to match methods with optional parameter. (please note there’s some a-bit-evil details to be discussed.)</li>
<li>If implicit conversion is required for parameter or return type, match method with matched implicit parameter first.</li>
<li>When explicit conversion is required or specified error parameter name or value type, compile time error will be triggered.</li>
</ol>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F04%2F13%2F231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html&amp;title=Peak+at+C%23+4.0%3A+optional+parameter%2C+named+parameter+and+method+resolution" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F04%2F13%2F231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html&amp;title=Peak+at+C%23+4.0%3A+optional+parameter%2C+named+parameter+and+method+resolution" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F04%2F13%2F231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html&amp;title=Peak+at+C%23+4.0%3A+optional+parameter%2C+named+parameter+and+method+resolution" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.feuvan.net%2F2010%2F04%2F13%2F231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html&amp;headline=Peak+at+C%23+4.0%3A+optional+parameter%2C+named+parameter+and+method+resolution" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Peak+at+C%23+4.0%3A+optional+parameter%2C+named+parameter+and+method+resolution&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F04%2F13%2F231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Peak+at+C%23+4.0%3A+optional+parameter%2C+named+parameter+and+method+resolution&amp;u=http%3A%2F%2Fblog.feuvan.net%2F2010%2F04%2F13%2F231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Peak+at+C%23+4.0%3A+optional+parameter%2C+named+parameter+and+method+resolution&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F04%2F13%2F231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Peak+at+C%23+4.0%3A+optional+parameter%2C+named+parameter+and+method+resolution&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F04%2F13%2F231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Peak+at+C%23+4.0%3A+optional+parameter%2C+named+parameter+and+method+resolution&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F04%2F13%2F231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F04%2F13%2F231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html&amp;title=Peak+at+C%23+4.0%3A+optional+parameter%2C+named+parameter+and+method+resolution&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.feuvan.net%2F2010%2F04%2F13%2F231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.feuvan.net%2F2010%2F04%2F13%2F231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F04%2F13%2F231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://blog.feuvan.net/2010/04/13/231-peak-at-c-4-0-optional-parameter-named-parameter-and-method-resolution.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let&#8217;s guess the trend of IT Tech in the next decade. Part.1</title>
		<link>http://blog.feuvan.net/2010/01/05/206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html</link>
		<comments>http://blog.feuvan.net/2010/01/05/206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html#comments</comments>
		<pubDate>Mon, 04 Jan 2010 17:28:02 +0000</pubDate>
		<dc:creator>feuvan</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[dotNET]]></category>
		<category><![CDATA[Interoperability]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Parallel]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://blog.feuvan.net/2010/01/05/206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html</guid>
		<description><![CDATA[Preface I supposed to write this blog post by the end of the last year, but it was delayed. These words are just IMHO. And you’ve already been familiar with these words. XML About 10 years ago, XML is considered &#8230; <a href="http://blog.feuvan.net/2010/01/05/206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3>Preface</h3>
<p>I supposed to write this blog post by the end of the last year, but it was delayed.</p>
<p>These words are just IMHO. And you’ve already been familiar with these words.</p>
<h3>XML</h3>
<p>About 10 years ago, XML is considered to be one of top 10 technologies that most programmers should master. Today XML is still the most important basis for cross-platform/language/system/blahblah message exchange/interpret. Meanwhile, JSON is becoming more and more popular in Web age for its lightweight. But in enterprise domain and business critical scenarios, XML related technologies provide these feature: flexible (better than JSON), open, robust (better than JSON) and compressible.&#160; (one important example: Office Open XML format .aka. <a href="http://www.ecma-international.org/publications/standards/Ecma-376.htm">ECMA-376</a>, it’s continue evolving along with Microsoft Office products in these years)</p>
<h3>Parallel</h3>
<p>I’m not talking about cloud. I’m talking about desktop parallel computing. With more and more multiple core CPUs are filling the market, the old programming style will be changed a bit.</p>
<p>The change will involve new compiler, new library (OpenMP for C/C++, .NET FX 4, etc), new language (someone may mention Erlang), and the most important, new programming model or thinking.</p>
<h3>Managed</h3>
<p>Managed languages like C# and Java will eat more market share from traditional ones. In the next ten years, we may see Native IL support CPU or its work-like-a-product prototype say hi to the world.</p>
<p>Script languages will get benefits from technologies like DLR from .NET. We have seen JPython/IronPython, JRuby/IronRuby, Groovy/PowerShell (well, this pair are not so suitable to compare), and we’ll see more.</p>
<h3>Mobile</h3>
<p>Netbook? UMPC? PDA Phone? We’ll enjoy a mobile life. From the next generation mobile, we may get more affordable next generation mobile data fee(beyond 3G, LTE), much fast dl/up speed, better signal coverage.</p>
<p>Designers and manufacturers will produce more powerful mobile device, and the meaning of “mobile” will be extended to many devices. More scenes in SF novel/movie will come true.</p>
<p>At the same time, IT system will be more friendly to mobile device. For example, better support for small screen, one hand operation, reader mode, etc.</p>
<h4>Universal</h4>
<p>I’m talking about OS. We’ll have more choice when choosing OS, Windows, Linux, Mac, BSD…. but they will talk to each other much more smoothly. With Microsoft’s <a href="http://www.microsoft.com/interop/">open promise on interoperability</a>, other OS and products can talk to one of the biggest market share holders’ products. People can see their different desktop/server can talk to each other more happily than before.</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#8211;</p>
<p>It’s a bit late (1:26AM, GMT+8), Ill try to finish the list in recent days and post it as Part.2</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F01%2F05%2F206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html&amp;title=Let%26rsquo%3Bs+guess+the+trend+of+IT+Tech+in+the+next+decade.+Part.1" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F01%2F05%2F206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html&amp;title=Let%26rsquo%3Bs+guess+the+trend+of+IT+Tech+in+the+next+decade.+Part.1" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F01%2F05%2F206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html&amp;title=Let%26rsquo%3Bs+guess+the+trend+of+IT+Tech+in+the+next+decade.+Part.1" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.feuvan.net%2F2010%2F01%2F05%2F206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html&amp;headline=Let%26rsquo%3Bs+guess+the+trend+of+IT+Tech+in+the+next+decade.+Part.1" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Let%26rsquo%3Bs+guess+the+trend+of+IT+Tech+in+the+next+decade.+Part.1&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F01%2F05%2F206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Let%26rsquo%3Bs+guess+the+trend+of+IT+Tech+in+the+next+decade.+Part.1&amp;u=http%3A%2F%2Fblog.feuvan.net%2F2010%2F01%2F05%2F206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Let%26rsquo%3Bs+guess+the+trend+of+IT+Tech+in+the+next+decade.+Part.1&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F01%2F05%2F206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Let%26rsquo%3Bs+guess+the+trend+of+IT+Tech+in+the+next+decade.+Part.1&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F01%2F05%2F206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Let%26rsquo%3Bs+guess+the+trend+of+IT+Tech+in+the+next+decade.+Part.1&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F01%2F05%2F206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F01%2F05%2F206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html&amp;title=Let%26rsquo%3Bs+guess+the+trend+of+IT+Tech+in+the+next+decade.+Part.1&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.feuvan.net%2F2010%2F01%2F05%2F206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.feuvan.net%2F2010%2F01%2F05%2F206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fblog.feuvan.net%2F2010%2F01%2F05%2F206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://blog.feuvan.net/2010/01/05/206-lets-guess-the-trend-of-it-tech-in-the-next-decade-part-1.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2009: A dynamic future of C#</title>
		<link>http://blog.feuvan.net/2008/10/31/173-2009-a-dynamic-future-of-c.html</link>
		<comments>http://blog.feuvan.net/2008/10/31/173-2009-a-dynamic-future-of-c.html#comments</comments>
		<pubDate>Fri, 31 Oct 2008 08:39:46 +0000</pubDate>
		<dc:creator>feuvan</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[dotNET]]></category>

		<guid isPermaLink="false">http://blog.feuvan.net/2008/10/31/173-2009-a-dynamic-future-of-c.html</guid>
		<description><![CDATA[70s coders learn C, Pascal, COBOL(one of the best IT jobs in economic crisis) 80s coders learn C 90s coders learn C++, Java, Delphi 21-century (long time no see this hot word during 1999-2001)  coders learn C#? - A homemade &#8230; <a href="http://blog.feuvan.net/2008/10/31/173-2009-a-dynamic-future-of-c.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>70s coders learn C, Pascal, COBOL(one of the best IT jobs in economic crisis)<br />
80s coders learn C<br />
90s coders learn C++, Java, Delphi<br />
21-century (long time no see this <em>hot</em> word during 1999-2001)  coders learn C#?</p>
<p align="right">- A homemade rumor by anonymous craven</p>
<p>On PDC 2008, Anders, former architecture of Turbo Pascal, Delphi, Visual J++, currently the father of C#, gives us a presentation <a href="http://channel9.msdn.com/pdc2008/TL16/" target="_blank">“The Future of C#”</a> about what new features C# 4.0 will have. The demo “Compiler as a service” is really cool. Think about the prompt “C# &gt;”.</p>
<p>Mads Torgersen, C# Language PM gives a <a title="The Future of C#" href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=csharpfuture&amp;DownloadId=3550" target="_blank">public released document</a> on <a href="http://code.msdn.microsoft.com/csharpfuture" target="_blank">C# Future site</a>, describes four main new features:</p>
<blockquote>
<h5>Dynamic lookup</h5>
<p>Dynamic lookup allows you to write method, operator and indexer calls, property and field accesses, and even object invocations which bypass the C# static type checking and instead gets resolved at runtime.</p>
<h5>Named and optional parameters</h5>
<p>Parameters in C# can now be specified as optional by providing a default value for them in a member declaration. When the member is invoked, optional arguments can be omitted. Furthermore, any argument can be passed by parameter name instead of position.</p>
<h5>COM specific interop features</h5>
<p>Dynamic lookup as well as named and optional parameters both help making programming against COM less painful than today. On top of that, however, we are adding a number of other small features that further improve the interop experience.</p>
<h5>Variance</h5>
<p>It used to be that an IEnumerable&lt;string&gt; wasn’t an IEnumerable&lt;object&gt;. Now it is – C# embraces type safe “co-and contravariance” and common BCL types are updated to take advantage of that.</p></blockquote>
<p>My comments:</p>
<table border="1" cellspacing="1" cellpadding="2" width="700">
<thead>
<tr>
<th width="150">features</th>
<th>benefit</th>
<th>side effect</th>
</tr>
</thead>
<tbody>
<tr>
<td>Dynamic lookup</td>
<td><strong>dynamic </strong>(runtime type detection) versus <strong>var </strong>(compile time type inference) introduced in C#3.0.<br />
No handwritten reflection codes any more.</td>
<td>No IntelliSense when programming.<br />
Difficult to defend unknown runtime exceptions, errors.</td>
</tr>
<tr>
<td>Named and optional parameters</td>
<td>ease function call of COM interop like VSTO, etc.</td>
<td>Named parameters looks Pythonic. But maybe <a href="http://channel9.msdn.com/pdc2008/TL10/" target="_blank">Jim</a> like this?</td>
</tr>
<tr>
<td>COM specific interop features</td>
<td>based on previous two new features, it’s easier.<br />
The biggest benefit: no runtime PIA more!</td>
<td>N/A? Time to migrate old workaround code.</td>
</tr>
<tr>
<td>Variance</td>
<td>more friendly</td>
<td>as above.</td>
</tr>
</tbody>
</table>
<p>These new features certainly relies on new .NET framework. At least, <strong>dynamic</strong> is not a language sugar like <strong>var</strong>.</p>
<p>Overall, C# is becoming more and more free-style language, combined compile-time and run-time power. It’s worthy to take a look at what C# will be if you are a C# developer or even a Java, C++ lover. Write less, do more. That’s the best value of the C# evolution, IMO.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2008%2F10%2F31%2F173-2009-a-dynamic-future-of-c.html&amp;title=2009%3A+A+dynamic+future+of+C%23" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2008%2F10%2F31%2F173-2009-a-dynamic-future-of-c.html&amp;title=2009%3A+A+dynamic+future+of+C%23" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2008%2F10%2F31%2F173-2009-a-dynamic-future-of-c.html&amp;title=2009%3A+A+dynamic+future+of+C%23" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.feuvan.net%2F2008%2F10%2F31%2F173-2009-a-dynamic-future-of-c.html&amp;headline=2009%3A+A+dynamic+future+of+C%23" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=2009%3A+A+dynamic+future+of+C%23&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2008%2F10%2F31%2F173-2009-a-dynamic-future-of-c.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=2009%3A+A+dynamic+future+of+C%23&amp;u=http%3A%2F%2Fblog.feuvan.net%2F2008%2F10%2F31%2F173-2009-a-dynamic-future-of-c.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=2009%3A+A+dynamic+future+of+C%23&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2008%2F10%2F31%2F173-2009-a-dynamic-future-of-c.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=2009%3A+A+dynamic+future+of+C%23&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2008%2F10%2F31%2F173-2009-a-dynamic-future-of-c.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=2009%3A+A+dynamic+future+of+C%23&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2008%2F10%2F31%2F173-2009-a-dynamic-future-of-c.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2008%2F10%2F31%2F173-2009-a-dynamic-future-of-c.html&amp;title=2009%3A+A+dynamic+future+of+C%23&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.feuvan.net%2F2008%2F10%2F31%2F173-2009-a-dynamic-future-of-c.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.feuvan.net%2F2008%2F10%2F31%2F173-2009-a-dynamic-future-of-c.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fblog.feuvan.net%2F2008%2F10%2F31%2F173-2009-a-dynamic-future-of-c.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://blog.feuvan.net/2008/10/31/173-2009-a-dynamic-future-of-c.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some articles for dotNET developer from MSDN Magazine</title>
		<link>http://blog.feuvan.net/2007/05/28/142-some-articles-for-dotnet-developer-from-msdn-magazine.html</link>
		<comments>http://blog.feuvan.net/2007/05/28/142-some-articles-for-dotnet-developer-from-msdn-magazine.html#comments</comments>
		<pubDate>Mon, 28 May 2007 03:44:31 +0000</pubDate>
		<dc:creator>feuvan</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[dotNET]]></category>

		<guid isPermaLink="false">http://blog.feuvan.net/index.php/2007/05/28/some-articles-for-dotnet-developer-from-msdn-magazine.html</guid>
		<description><![CDATA[Garbage collection: Garbage Collection: Automatic Memory Management in the Microsoft .NET Framework &#8212; MSDN Magazine, November 2000 Garbage Collection-Part 2: Automatic Memory Management in the Microsoft .NET Framework &#8212; MSDN Magazine, December 2000 Garbage Collector Basics and Performance Hints &#8212; &#8230; <a href="http://blog.feuvan.net/2007/05/28/142-some-articles-for-dotnet-developer-from-msdn-magazine.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Garbage collection:<br />
<a href="http://msdn.microsoft.com/msdnmag/issues/1100/gci/">Garbage Collection: Automatic Memory Management in the Microsoft .NET Framework &#8212; MSDN Magazine, November 2000</a><br />
<a href="http://msdn.microsoft.com/msdnmag/issues/1200/GCI2/default.aspx">Garbage Collection-Part 2: Automatic Memory Management in the Microsoft .NET Framework &#8212; MSDN Magazine, December 2000</a><br />
<a href="http://msdn2.microsoft.com/en-us/library/ms973837.aspx">Garbage Collector Basics and Performance Hints &#8212; MSDN</a></p>
<p>widely spreaded article about tools:<br />
<a href="http://msdn.microsoft.com/msdnmag/issues/04/07/MustHaveTools/">.NET Tools: Ten Must-Have Tools Every Developer Should Download Now &#8212; MSDN Magazine, July 2004</a></p>
<p>wix and msbuild:<br />
<a href="http://msdn.microsoft.com/msdnmag/issues/07/03/WixTricks/default.aspx">WiX Tricks: Automate Releases With MSBuild And Windows Installer XML &#8212; MSDN Magazine, March 2007</a></p>
<p>something new:<br />
<a href="http://msdn.microsoft.com/msdnmag/issues/07/02/CLRInsideOut/default.aspx">CLR Inside Out: .NET Application Extensibility &#8212; MSDN Magazine, February 2007</a><br />
<a href="http://msdn.microsoft.com/msdnmag/issues/07/03/CLRInsideOut/default.aspx">CLR Inside Out: .NET Application Extensibility, Part 2 &#8212; MSDN Magazine, March 2007</a><br />
<a href="http://msdn.microsoft.com/msdnmag/issues/07/05/CLRInsideOut/default.aspx">CLR Inside Out: 9 Reusable Parallel Data Structures and Algorithms &#8212; MSDN Magazine, May 2007</a></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F05%2F28%2F142-some-articles-for-dotnet-developer-from-msdn-magazine.html&amp;title=Some+articles+for+dotNET+developer+from+MSDN+Magazine" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F05%2F28%2F142-some-articles-for-dotnet-developer-from-msdn-magazine.html&amp;title=Some+articles+for+dotNET+developer+from+MSDN+Magazine" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F05%2F28%2F142-some-articles-for-dotnet-developer-from-msdn-magazine.html&amp;title=Some+articles+for+dotNET+developer+from+MSDN+Magazine" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.feuvan.net%2F2007%2F05%2F28%2F142-some-articles-for-dotnet-developer-from-msdn-magazine.html&amp;headline=Some+articles+for+dotNET+developer+from+MSDN+Magazine" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Some+articles+for+dotNET+developer+from+MSDN+Magazine&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F05%2F28%2F142-some-articles-for-dotnet-developer-from-msdn-magazine.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Some+articles+for+dotNET+developer+from+MSDN+Magazine&amp;u=http%3A%2F%2Fblog.feuvan.net%2F2007%2F05%2F28%2F142-some-articles-for-dotnet-developer-from-msdn-magazine.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Some+articles+for+dotNET+developer+from+MSDN+Magazine&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F05%2F28%2F142-some-articles-for-dotnet-developer-from-msdn-magazine.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Some+articles+for+dotNET+developer+from+MSDN+Magazine&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F05%2F28%2F142-some-articles-for-dotnet-developer-from-msdn-magazine.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Some+articles+for+dotNET+developer+from+MSDN+Magazine&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F05%2F28%2F142-some-articles-for-dotnet-developer-from-msdn-magazine.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F05%2F28%2F142-some-articles-for-dotnet-developer-from-msdn-magazine.html&amp;title=Some+articles+for+dotNET+developer+from+MSDN+Magazine&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.feuvan.net%2F2007%2F05%2F28%2F142-some-articles-for-dotnet-developer-from-msdn-magazine.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.feuvan.net%2F2007%2F05%2F28%2F142-some-articles-for-dotnet-developer-from-msdn-magazine.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F05%2F28%2F142-some-articles-for-dotnet-developer-from-msdn-magazine.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://blog.feuvan.net/2007/05/28/142-some-articles-for-dotnet-developer-from-msdn-magazine.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Library Classes in &quot;Orcas&quot;</title>
		<link>http://blog.feuvan.net/2007/04/19/132-new-library-classes-in-orcas.html</link>
		<comments>http://blog.feuvan.net/2007/04/19/132-new-library-classes-in-orcas.html#comments</comments>
		<pubDate>Thu, 19 Apr 2007 09:02:48 +0000</pubDate>
		<dc:creator>feuvan</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[dotNET]]></category>

		<guid isPermaLink="false">http://blog.feuvan.net/index.php/2007/04/19/new-library-classes-in-orcas.html</guid>
		<description><![CDATA[.NET Framework 3.5 is scheduled to be shipped with &#8220;Orcas&#8221; later&#160;2007 or early 2008. &#8220;Orcas&#8221;&#160;is the codename of Microsoft&#8217;s next generation of the heavy and effective IDE Visual Studio 2007. According to Microsoft site, the new .NET Framework has been &#8230; <a href="http://blog.feuvan.net/2007/04/19/132-new-library-classes-in-orcas.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>.NET Framework 3.5 is scheduled to be shipped with &#8220;Orcas&#8221; later&nbsp;2007 or early 2008. &#8220;Orcas&#8221;&nbsp;is the codename of Microsoft&#8217;s next generation of the heavy and effective IDE Visual Studio 2007.</p>
<p>According to Microsoft site, the new .NET Framework has been divided into two parts: red bits and green bits. The red bits is backward-compatible 3.0 netFX&nbsp;libraries, while the green bits is totally new assemblies with some extra new features including:</p>
<ul>
<li>A new add-in hosting model, which was discussed in the last two editions of CLR Inside Out
<li>Support for the Suite B set of cryptographic algorithms, as specified by the National Security Agency (NSA)
<li>Support for big integers
<li>A high-performance set collection
<li>Support for anonymous and named pipes
<li>Improved time zone support
<li>Lightweight reader/writer lock classes
<li>Better integration with Event Tracing for Windows<sup class="clsSmall">®</sup> (ETW), including ETW provider and ETW trace listener APIs</li>
</ul>
<h3>Suite B Implementations</h3>
<p>Suite B standard&nbsp;is from <a href="http://www.nsa.gov/ia/industry/crypto_suite_b.cfm" target="_blank">NSA,</a> including these implementations:</p>
<ul>
<li>The Advanced Encryption Standard (AES) with key sizes of 128 and 256 bits for encryption
<li>The Secure Hash Algorithm (SHA-256 and SHA-384) for hashing
<li>The Elliptic Curve Digital Signature Algorithm (ECDSA) using curves of 256-bit and 384-bit prime moduli for signing
<li>Elliptic Curve Diffie-Hellman (ECDH) using curves of 256 and 384-bit prime moduli for key exchange/secret agreement</li>
</ul>
<p>The new .NET Framework provides these implementations, and also a new class named CngKey:</p>
<blockquote><p>To support our new CNG-based managed cryptography classes, we&#8217;ve added a CngKey class to abstract the storage and usage of CNG keys. CNG keys work similarly to key containers in today&#8217;s Crypto API (CAPI)—they allow you to store a key pair or a public key securely and refer to it using a simple string name. You can use CngKey objects when working with the ECDsaCng and ECDiffieHellmanCng classes.</p>
<p>You can also use the CngKey class directly to perform many operations, including opening, creating, deleting, and exporting keys. If we don&#8217;t have a managed API for the operation you want, you can get to the underlying key handle to use when calling Win32<sup>®</sup> APIs directly.</p>
</blockquote>
<h3>Better Integer Support: BigInteger</h3>
<p>Now you can have the BigInteger class with these operation supports:</p>
<li>Abs (returns the absolute value for a given BigInteger)
<li>Compare (compares two BigIntegers)
<li>Divide (returns the quotient of two BigIntegers)
<li>DivRem (returns both the quotient and the remainder of two BigIntegers)
<li>Equals (returns true if two BigIntegers have the same value)
<li>GreatestCommonDivisor (returns the maximum number that is a divisor of both BigIntegers)
<li>ModPow (returns one BigInteger raised to the power of another BigInteger modulo a third; the exponent cannot be negative)
<li>Pow (returns one BigInteger raised to the power of another; the exponent cannot be negative)
<li>Remainder (returns the remainder of dividing one BigInteger by another)<br />
<h3>A New High-Performance Collection Class: HashSet</h3>
<p>The new class HashSet was added to System.Collection.Generic namespace as a unordered generic high-performance collections that contains unique elements. It implements all the standard collection methods (such as Add, Remove, and Contains) and provides several set operations (including union, intersection, and symmetric difference). It&#8217;s easy to use and with high-performance.</p>
<h3>Pipes: System.IO.Pipes</h3>
<p>Both anonymous and named pipes are supported. Now nearly all the pipe functionality provided by Windows are exposed. Now it&#8217;s easy to achieve IPC from managed code. If you have&nbsp;experience with Windows native pipes, you will get no trouble to start with the new managed class.</p>
<h3>Conclusion</h3>
<p>We can expect more complete .NET Framework covering your industry, commercial, personal development&nbsp;requirements. As Microsoft has been described, .NET Framework will as last cover what Win32 SDK covers. It&#8217;s not rumor or business advertisement, I believe managed code will be <em>natively</em> supported by OS one day, neither .NET nor Java, or some other languages.</p>
</li>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F04%2F19%2F132-new-library-classes-in-orcas.html&amp;title=New+Library+Classes+in+%26quot%3BOrcas%26quot%3B" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F04%2F19%2F132-new-library-classes-in-orcas.html&amp;title=New+Library+Classes+in+%26quot%3BOrcas%26quot%3B" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F04%2F19%2F132-new-library-classes-in-orcas.html&amp;title=New+Library+Classes+in+%26quot%3BOrcas%26quot%3B" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.feuvan.net%2F2007%2F04%2F19%2F132-new-library-classes-in-orcas.html&amp;headline=New+Library+Classes+in+%26quot%3BOrcas%26quot%3B" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=New+Library+Classes+in+%26quot%3BOrcas%26quot%3B&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F04%2F19%2F132-new-library-classes-in-orcas.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=New+Library+Classes+in+%26quot%3BOrcas%26quot%3B&amp;u=http%3A%2F%2Fblog.feuvan.net%2F2007%2F04%2F19%2F132-new-library-classes-in-orcas.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=New+Library+Classes+in+%26quot%3BOrcas%26quot%3B&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F04%2F19%2F132-new-library-classes-in-orcas.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=New+Library+Classes+in+%26quot%3BOrcas%26quot%3B&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F04%2F19%2F132-new-library-classes-in-orcas.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=New+Library+Classes+in+%26quot%3BOrcas%26quot%3B&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F04%2F19%2F132-new-library-classes-in-orcas.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F04%2F19%2F132-new-library-classes-in-orcas.html&amp;title=New+Library+Classes+in+%26quot%3BOrcas%26quot%3B&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.feuvan.net%2F2007%2F04%2F19%2F132-new-library-classes-in-orcas.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.feuvan.net%2F2007%2F04%2F19%2F132-new-library-classes-in-orcas.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F04%2F19%2F132-new-library-classes-in-orcas.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://blog.feuvan.net/2007/04/19/132-new-library-classes-in-orcas.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Developing MSN/WLM Add-in Part.I</title>
		<link>http://blog.feuvan.net/2007/02/28/105-developing-msnwlm-add-in-part-1.html</link>
		<comments>http://blog.feuvan.net/2007/02/28/105-developing-msnwlm-add-in-part-1.html#comments</comments>
		<pubDate>Wed, 28 Feb 2007 07:50:40 +0000</pubDate>
		<dc:creator>feuvan</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[dotNET]]></category>
		<category><![CDATA[WLM]]></category>

		<guid isPermaLink="false">http://feuvan.net/wordpress/?p=105</guid>
		<description><![CDATA[微软的Messenger SDK分为面向多人应用的Activity SDK和面向单人应用的 Add-in SDK（Windows Live Messenger Add-In API）。不过Live时代的WLM Add-In SDK相较于之前的MSN Messenger API，开放的接口反而少了。自微软实行.NET战略以来，Windows平台应用程序开发的主流逐渐由以往的VC++与Platform SDK搭配的方式转由.NET Framework与C#。然则.NET Framework由于设计的目的与一般普适的Platform SDK并不完全一致或者包容后者，在开发许多real world scenario 下的具体应用时，仍需要依赖Inter OP来使用现有COM组件的接口（关于.NET的本质是COM的论述，实际上也有不少相关文章可供参考，读者可自行利用谷歌雅虎百度搜寻，亦可于水木社区dotNET讨论区的精华文章中寻找。） 事实上，无论是新的WLM SDK，或者旧的Messenger API，皆是安装有WLM后才注册在系统中的COM组件。而WLM Add-in与MSN Messenger API最大的不同，就是开发语言必须是基于.NET Framework 2.0的C#，C++/CLI，VB#，J#，抑或IronPython等脚本语言。本文将会以一个实际的例子来探讨如何以C#来开发WLM的 Add-In。 要启用插件功能，首先需要修改注册表项。在HKCU\Software\Microsoft\MSNMessenger新建DWORD项，名为AddInFeatureEnabled，值设置为1。或者将以下四行文本存为reg文件导入。 Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\MSNMessenger] &#8220;AddInFeatureEnabled&#8221;=dword:00000001 修改了注册表之后，登录WLM，在Option菜单中就会出现Add-ins选项，点击Add to &#8230; <a href="http://blog.feuvan.net/2007/02/28/105-developing-msnwlm-add-in-part-1.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span>微软的Messenger SDK分为面向多人应用的Activity SDK和面向单人应用的 Add-in SDK（<a href="http://msdn2.microsoft.com/en-us/library/aa905655.aspx">Windows Live Messenger Add-In API</a>）。不过Live时代的WLM Add-In SDK相较于之前的MSN Messenger API，开放的接口反而少了。自微软实行.NET战略以来，Windows平台应用程序开发的主流逐渐由以往的VC++与Platform SDK搭配的方式转由.NET Framework与C#。然则.NET Framework由于设计的目的与一般普适的Platform SDK并不完全一致或者包容后者，在开发许多real world scenario 下的具体应用时，仍需要依赖Inter OP来使用现有COM组件的接口（关于.NET的本质是COM的论述，实际上也有不少相关文章可供参考，读者可自行利用谷歌雅虎百度搜寻，亦可于水木社区dotNET讨论区的精华文章中寻找。）<br />
</span></p>
<p><span>事实上，无论是新的WLM SDK，或者旧的Messenger API，皆是安装有WLM后才注册在系统中的COM组件。而WLM Add-in与MSN Messenger API最大的不同，就是开发语言必须是基于.NET Framework 2.0的C#，C++/CLI，VB#，J#，抑或IronPython等脚本语言。本文将会以一个实际的例子来探讨如何以C#来开发WLM的 Add-In。<br />
</span></p>
<p><span>要启用插件功能，首先需要修改注册表项。在HKCU\Software\Microsoft\MSNMessenger新建DWORD项，名为AddInFeatureEnabled，值设置为1。或者将以下四行文本存为reg文件导入。<br />
</span></p>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup>
<col style="width:388px"/></colgroup>
<tbody valign="top">
<tr>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>Windows Registry Editor Version 5.00<br />
</span></p>
</p>
<p><span>[HKEY_CURRENT_USER\Software\Microsoft\MSNMessenger]<br />
</span></p>
<p><span>&#8220;AddInFeatureEnabled&#8221;=dword:00000001</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p><span>    修改了注册表之后，登录WLM，在Option菜单中就会出现Add-ins选项，点击Add to Messenger，找到Add-In dll就可以加载了<br />
</span></p>
</p>
<p><span>打开VS 2005（亦可使用<a href="http://msdn.microsoft.com/vstudio/express/visualcsharp/">Visual C# 2005 Express Edition</a>），建立Class Library工程，名为WLMAddintest，添加引用Messenger API（Project，Add Reference，COM，Messenger API Type Library），添加引用Messenger Client（Project，Add Reference，Browse，C:\Program Files\MSN Messenger\MessengerClient.dll）。<br />
</span></p>
<p><span>将CS文件改名为test.cs，并新建一个名为TestFrm的新窗体。<br />
</span></p>
<p><span>更改输出assembly的文件名为WLMAddintest.Test（Project，WLMAddintest Properties，Application，Assembly Name）。因为WLM Add-In对于文件名有着严格的限制，必须是namespace.classname.dll的方式，否则将不能加载。当然你可以使用匿名命名空间，这样就可以只生成test.dll让WLM加载。<br />
</span></p>
<p><span>Frame代码先省略，其中test.cs代码如下：<br />
</span></p>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup>
<col style="width:491px"/></colgroup>
<tbody valign="top">
<tr>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>using System;<br />
</span></p>
<p><span>using System.Collections.Generic;<br />
</span></p>
<p><span>using System.Text;<br />
</span></p>
<p><span>using System.Windows.Forms;<br />
</span></p>
<p><span>using Microsoft.Messenger;<br />
</span></p>
</p>
<p><span>namespace WLMAddintest<br />
</span></p>
<p><span>{<br />
</span></p>
<p><span>public class Test: IMessengerAddIn<br />
</span></p>
<p><span>{<br />
</span></p>
<p><span>public MessengerClient m_client;<br />
</span></p>
<p><span>public Form frm;<br />
</span></p>
<p><span>public void Initialize(MessengerClient client)<br />
</span></p>
<p><span>{<br />
</span></p>
<p><span>m_client = client;<br />
</span></p>
<p><span>m_client.Shutdown += new EventHandler(this.Shutdown);<br />
</span></p>
</p>
<p><span>m_client.AddInProperties.Url = new Uri(&#8220;http://dev.feuvan.net/&#8221;);<br />
</span></p>
<p><span>m_client.AddInProperties.FriendlyName = &#8220;test add-in&#8221;;<br />
</span></p>
<p><span>frm = new TestFrm();<br />
</span></p>
<p><span>frm.Show();<br />
</span></p>
<p><span>}<br />
</span></p>
<p><span>public void Shutdown(object sender, EventArgs e)<br />
</span></p>
<p><span>{<br />
</span></p>
<p><span>frm.Close();<br />
</span></p>
<p><span>}<br />
</span></p>
<p><span>}<br />
</span></p>
<p><span>}</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p><span>    在以上部分代码中，我们建立了一个名为test的类，实现了IMessengerAddIn接口，而Initialize则是Add-In的入口。另外我们绑定了Shutdown事件，Shutdown事件是在Add-In被unload，用户登出WLM或者关闭WLM发生的。读者可以使用VS的Object Browser来浏览MessengerClient提供的接口（选中Reference中的MessengerClient，双击或者右键View in Object Browser）。<br />
</span></p>
<p><span>MessengerClient类共有五种事件，皆可绑定到自己定义的事件响应函数上。<br />
</span></p>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup>
<col />
<col />
<col /></colgroup>
<tbody valign="top">
<tr>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>事件</span></p>
</td>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>事件描述</span></p>
</td>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>参数描述</span></p>
</td>
</tr>
<tr>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span></span><span style="color:#0066cc; text-decoration:underline"><strong>EventHandler&lt;IncomingTextMessageEventArgs&gt;</strong></span><span style="color:black"><br />
									<strong>IncomingTextMessage</strong></span></p>
</td>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>文本消息传入时发生</span></p>
</td>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span></span><span style="color:#0066cc; font-size:9pt; text-decoration:underline"><strong>IncomingTextMessageEventArgs</strong></span>有两个属性
</p>
<p><span>string TextMessage和User UserFrom</span></p>
</td>
</tr>
<tr>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span></span><span style="color:#0066cc; text-decoration:underline"><strong>EventHandler&lt;OutgoingTextMessageEventArgs&gt;</strong></span><span style="color:black"><br />
									<strong>OutgoingTextMessage</strong></span></p>
</td>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>文本消息传出时发生</span></p>
</td>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span></span><span style="color:#0066cc; font-size:9pt; text-decoration:underline"><strong>OutgoingTextMessageEventArgs</strong></span>有两个属性
</p>
<p><span>string TextMessage和User UserTo</span></p>
</td>
</tr>
<tr>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span></span><span style="color:#0066cc; text-decoration:underline"><strong>EventHandler</strong></span><span style="color:black"><br />
									<strong>ShowOptionsDialog</strong></span></p>
</td>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>用户点击Add-In的Settings时发生</span></p>
</td>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>N/A</span></p>
</td>
</tr>
<tr>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span></span><span style="color:#0066cc; text-decoration:underline"><strong>EventHandler</strong></span><span style="color:black"><br />
									<strong>Shutdown</strong></span></p>
</td>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>Add-In被unload时发生</span></p>
</td>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>N/A</span></p>
</td>
</tr>
<tr>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span></span><span style="color:#0066cc; text-decoration:underline"><strong>EventHandler&lt;StatusChangedEventArgs&gt;</strong></span><span style="color:black"><br />
									<strong>StatusChanged</strong></span></p>
</td>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>有用户的状态改变时发生，如登入登出。</span></p>
</td>
<td vAlign="middle" style="padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span></span><span style="color:#0066cc; font-size:9pt; text-decoration:underline"><strong>StatusChangedEventArgs</strong></span>有一个属性
</p>
<p><span>User User</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p><span>    其中User类的属性有昵称，email，个人状态信息，状态，唯一ID，并有一个方法GetGroupNames，可以得到用户所在的组名。<br />
</span></p>
<p><span>MessengerClient类有三种属性：<br />
</span></p>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup>
<col style="width:160px"/>
<col style="width:33px"/>
<col style="width:338px"/></colgroup>
<tbody valign="top">
<tr>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>属性</span></p>
</td>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>限制</span></p>
</td>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>作用</span></p>
</td>
</tr>
<tr>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  none; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span></span><span style="color:#0066cc; text-decoration:underline"><strong>AddInProperties</strong></span><span style="color:black"><br />
									<strong>AddInProperties</strong></span></p>
</td>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>读写</span></p>
</td>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>设置Add-In的信息如名称，作者，描述，URL等</span></p>
</td>
</tr>
<tr>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  none; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span></span><span style="color:#0066cc; text-decoration:underline"><strong>User</strong></span><span style="color:black"><br />
									<strong>LocalUser</strong></span></p>
</td>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>只读</span></p>
</td>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>当前登录用户的属性，包括昵称，email，个人状态信息，状态，唯一ID</span></p>
</td>
</tr>
<tr>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  none; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span></span><span style="color:#0066cc; text-decoration:underline"><strong>string</strong></span><span style="color:black"><br />
									<strong>SavedState</strong></span></p>
</td>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>读写</span></p>
</td>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>提供Add-In存储空间。<br />
</span></p>
<p><span>由于WLM Add-In的安全限制，Add-In不能访问本地文件。所以配置等信息可以串行化之后保存在SavedState变量中，下次启动从这里读取。</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p><span>    MessengerClient类有三个方法：<br />
</span></p>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup>
<col style="width:460px"/>
<col style="width:72px"/></colgroup>
<tbody valign="top">
<tr>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>方法</span></p>
</td>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>作用</span></p>
</td>
</tr>
<tr>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  none; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span></span><span style="color:black"><strong>void</strong><br />
									<strong>SendActionMessage</strong>(</span><span style="color:#0066cc; text-decoration:underline"><strong>string</strong></span><span style="color:black"><br />
									<em>actionText</em><strong>, </strong></span><span style="color:#0066cc; text-decoration:underline"><strong>Microsoft.Messenger.User</strong></span><span style="color:black"><br />
									<em>userTo</em>)</span></p>
</td>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>发送动作</span></p>
</td>
</tr>
<tr>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  none; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span></span><span style="color:black"><strong>void</strong><br />
									<strong>SendNudgeMessage</strong>(</span><span style="color:#0066cc; text-decoration:underline"><strong>Microsoft.Messenger.User</strong></span><span style="color:black"><br />
									<em>userTo</em>)</span></p>
</td>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>发送震动信息</span></p>
</td>
</tr>
<tr>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  none; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span></span><span style="color:black"><strong>void</strong><br />
									<strong>SendTextMessage</strong>(</span><span style="color:#0066cc; text-decoration:underline"><strong>string</strong></span><span style="color:black"><br />
									<em>text</em><strong>, </strong></span><span style="color:#0066cc; text-decoration:underline"><strong>Microsoft.Messenger.User</strong></span><span style="color:black"><br />
									<em>userTo</em>)</span></p>
</td>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>发送文本</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p><span>至于这里的User参数，基本上都是相应IncomingTextMessage的时候传进来的UserFrom参数。例如：<br />
</span></p>
<div>
<table style="border-collapse:collapse" border="0">
<colgroup>
<col style="width:531px"/></colgroup>
<tbody valign="top">
<tr>
<td vAlign="middle" style="padding-top: 1px; padding-left: 7px; padding-bottom: 1px; padding-right: 7px; border-top:  solid black 0.5pt; border-left:  solid black 0.5pt; border-bottom:  solid black 0.5pt; border-right:  solid black 0.5pt">
<p><span>void messenger_IncomingTextMessage(object sender, IncomingTextMessageEventArgs e)<br />
</span></p>
<p><span>{<br />
</span></p>
<p><span>Microsoft.Messenger.User from = (Microsoft.Messenger.User)e.UserFrom;<br />
</span></p>
<p><span>messenger.SendTextMessage(output, from);<br />
</span></p>
<p><span>}</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p><span>从上面的例子我们可以看到，WLM Add-In SDK还是很弱的，基本上只能拿来写机器人用，当然了，现在MSN机器人层出不穷，也不新鲜了。<br />
</span></p>
<p><span>接下来，就让我们来看看Messenger API能干点什么，以及更高级的话题。<br />
</span></p>
<p><span>后续内容更精彩，敬请继续关注。</span></p>
<p>
see also: <a href="http://blog.feuvan.net/index.php/2007/03/27/developing-msnwlm-add-in-part-2.html">Developing MSN/WLM Add-in Part.II</a></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F02%2F28%2F105-developing-msnwlm-add-in-part-1.html&amp;title=Developing+MSN%2FWLM+Add-in+Part.I" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F02%2F28%2F105-developing-msnwlm-add-in-part-1.html&amp;title=Developing+MSN%2FWLM+Add-in+Part.I" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F02%2F28%2F105-developing-msnwlm-add-in-part-1.html&amp;title=Developing+MSN%2FWLM+Add-in+Part.I" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fblog.feuvan.net%2F2007%2F02%2F28%2F105-developing-msnwlm-add-in-part-1.html&amp;headline=Developing+MSN%2FWLM+Add-in+Part.I" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Developing+MSN%2FWLM+Add-in+Part.I&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F02%2F28%2F105-developing-msnwlm-add-in-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Developing+MSN%2FWLM+Add-in+Part.I&amp;u=http%3A%2F%2Fblog.feuvan.net%2F2007%2F02%2F28%2F105-developing-msnwlm-add-in-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Developing+MSN%2FWLM+Add-in+Part.I&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F02%2F28%2F105-developing-msnwlm-add-in-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Developing+MSN%2FWLM+Add-in+Part.I&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F02%2F28%2F105-developing-msnwlm-add-in-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Developing+MSN%2FWLM+Add-in+Part.I&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F02%2F28%2F105-developing-msnwlm-add-in-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F02%2F28%2F105-developing-msnwlm-add-in-part-1.html&amp;title=Developing+MSN%2FWLM+Add-in+Part.I&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fblog.feuvan.net%2F2007%2F02%2F28%2F105-developing-msnwlm-add-in-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fblog.feuvan.net%2F2007%2F02%2F28%2F105-developing-msnwlm-add-in-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fblog.feuvan.net%2F2007%2F02%2F28%2F105-developing-msnwlm-add-in-part-1.html" ><img class="lightsocial_img" src="http://blog.feuvan.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://blog.feuvan.net/2007/02/28/105-developing-msnwlm-add-in-part-1.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

