<?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>Michael Sync &#187; C#</title>
	<atom:link href="http://michaelsync.net/category/c/feed" rel="self" type="application/rss+xml" />
	<link>http://michaelsync.net</link>
	<description>Sharing our knowledge</description>
	<lastBuildDate>Wed, 21 Jul 2010 01:43:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>C# 3.0 Tutorials: What is Anonymous type?</title>
		<link>http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types</link>
		<comments>http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types#comments</comments>
		<pubDate>Thu, 06 Mar 2008 13:47:18 +0000</pubDate>
		<dc:creator>Michael Sync</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types</guid>
		<description><![CDATA[This is my fourth part of my C# 3.0 tutorials. We have finished learning about automatic properties that introduces new and shorter way of creating the properties, object and collection initializer that gave us the way to initialize the object or collection in shorter and cool way, implicitly typed local variables that can be declared [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F03%2F06%2Fc-30-tutorials-understanding-about-anonymous-types"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F03%2F06%2Fc-30-tutorials-understanding-about-anonymous-types&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>This is my fourth part of my <a href="http://michaelsync.net/2008/02/29/c-30-tutorials-with-visual-studio-2008-for-beginners">C# 3.0 tutorials</a>. We have finished learning about automatic properties that introduces new and shorter way of creating the properties, object and collection initializer that gave us the way to initialize the object or collection in shorter and cool way, implicitly typed local variables that can be declared without specifying the type explicitly. I told you that implicitly typed local variables and anonymous type are the best match but I didn&#8217;t mention anything about Anonymous type in previous tutorial. Now, it is the time we start discussing about anonymous type which is introduced in C# 3.0.</p>
<h2>What&#8217;s Anonymous type?</h2>
<p>Anonymous type is the type that is created anonymously. Anonymous type is a class that is created automatically by compiler in somewhere you can&#8217;t see directly while you are declaring the structure of that class. Confusing? Let me show you one example.</p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1 {
class Program {
static void Main(string[] args) {
Person _person = new Person { ID = 1, FirstName = &quot;Michael&quot;, LastName = &quot;Sync&quot; };
Console.WriteLine(&quot;Name: {0} {1}&quot;, _person.FirstName, _person.LastName);
Console.ReadLine();
}
}
public class Person {
public int ID { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
}
}
</pre>
<p>Please take a look at the code above. I created a class called Person that has three properties such as ID, FirstName and LastName. In Main() function, I declared a variable and initialized the properties of the instance.  Yes. this is just a normal way of creating a class and initializing the instance that we have been doing this for years.</p>
<p>Now, I will change the normal class to anonymous type.<br />
<img src="http://michaelsync.net/wp-content/uploads/2008/03/a-type.jpg" alt="Anonymous types" /></p>
<p>The first thing that you need to do is that remove the class. (C# compiler will create the anonymous class based on what you initialize with.) Secondly, we have to change _person variable to implicitly-typed local variable by replacing &#8220;Person&#8221; with &#8220;var&#8221;. Because we have removed Person class from our code so that we won&#8217;t know about the type. That&#8217;s why the variable &#8220;_person&#8221; should be declared as a implicitly-typed local variable. Then, we will remove &#8220;Person&#8221; after &#8220;new&#8221; keyword.</p>
<p>So, our final code will be like that below ~</p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1 {
class Program {
static void Main(string[] args) {
var _person = new { ID = 1,
FirstName = &quot;Michael&quot;,
LastName = &quot;Sync&quot; };

Console.WriteLine(&quot;Name: {0} {1}&quot;,
_person.FirstName,
_person.LastName);

Console.ReadLine();
}
}
}
</pre>
<p>It&#8217;s just like using object and collection initializer. but the magic comes at this point. The C# compiler will create the anonymous class based on the initializer in IL. You can&#8217;t see/access that class directly from code but you should know there is a class.</p>
<p>Now, I think that you understand what Anonymous types are and how to create them. But there is one important must-known thing left to tell you. Keep in mind that you can create the Anonymous type as the way that I showed above but this is NOT what it is designed for.</p>
<p>Let me share you one nice comment from <a href="http://blogs.msdn.com/abhinaba/archive/2005/09/19/471101.aspx">this link</a>.</p>
<blockquote><p>I think that perhaps your dislike of C#&#8217;s new features stems from the fact that you are looking at the new features and trying to imagine how you would use them within the context of your current programming patterns. However, these new features are designed to be used in completely new ways.</p>
<p>Anonymous types are not meant to be used in places where you would care about their name or method overriding &#8212; in those cases you should use a class. Anonymous types are for when you want to just group together a bunch of data items. Perhaps you are running a query that returnsa few arbitrary pieces of data, or maybe you have a function that needs to return multiple pieces of data. Can you imagine what it would be like if you had to create a new class for each different query in an application?</p>
<p>C# 3.0&#8242;s new set-based operators (LINQ) give us wonderful new tools for working with data sets. One thing we frequently need is objects which do nothing besides hold data to iterate over. Do you want to define a datatype for every query that returns a different set of columns? Quite frankly, it&#8217;s a pain in the butt. It leads to a proliferation of meaningless types, type unsafety (just using objects), or somewhere inbetween (having a bunch of standard types and only filling in whatever data is returned because maintaining the types every time a query changes becomes too much work).</p>
<p>The type proliferation problem is especially bad in Java where each class requires its own file. As a side note, I once wrote a compiler for a language with lexical scoping (like Pascal, where a function could have an inner function that can access the local variables of its outer function). This means that each local variable scope requires its own separate data structure, which would have to have its own separate class file if the compiler were targeting the JVM. What&#8217;s the point of having a whole bunch of classes with no methods and every member public?</p>
<p>internal class CustomerName_OrderCount { public string Name; public int Count; }<br />
internal class CustomerName_Country { public string Name; public string Country; }<br />
internal class CustomerName_Country_State_Phone { public string Name; public string Country; public string State; public string Phone; }<br />
internal class CustomerName_Country_State_Phone_OrderCount { public string Name; public string Country; public string State; public string Phone; public int Count; }</p>
<p>I wouldn&#8217;t want an unnecessary mess like that cluttering up my code.</p>
<p>Additionally, though, having anonymous types means that the compiler knows that calling the constructor and properties have no side-effects, which allows it to reason about the values in ways it otherwise could not. This is important for being able to translate queries to SQL and know that you&#8217;re getting the correct semantics.</p></blockquote>
<p>I really like this comment and it did explain a lot. Anonymous types are designed for LINQ. If you are very new to LINQ then you might feel those C# 3.0 features are not so cool but once you got that then you will just love them. :)</p>
<p>Let&#8217;s take a look the practical way of using Anonymous type with LINQ ~</p>
<p>We have one XML file as following structure and data.</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&lt;Girls&gt;
&lt;Girl&gt;
&lt;Name&gt;Camilla Belle&lt;/Name&gt;
&lt;DateOfBirth&gt;October 2, 1986&lt;/DateOfBirth&gt;
&lt;/Girl&gt;
&lt;Girl&gt;
&lt;Name&gt;Megan Fox&lt;/Name&gt;
&lt;DateOfBirth&gt;May 16, 1986&lt;/DateOfBirth&gt;
&lt;/Girl&gt;
&lt;Girl&gt;
&lt;Name&gt;Vicki Zhao(Zhao Wei)&lt;/Name&gt;
&lt;DateOfBirth&gt;March 12, 1976&lt;/DateOfBirth&gt;
&lt;/Girl&gt;
&lt;Girl&gt;
&lt;Name&gt;Kelly Hu&lt;/Name&gt;
&lt;DateOfBirth&gt;February 13, 1968&lt;/DateOfBirth&gt;
&lt;/Girl&gt;
&lt;Girl&gt;
&lt;Name&gt;Elisha Cuthbert&lt;/Name&gt;
&lt;DateOfBirth&gt;November 30, 1982&lt;/DateOfBirth&gt;
&lt;/Girl&gt;
&lt;Girl&gt;
&lt;Name&gt;Alicia Silverston&lt;/Name&gt;
&lt;DateOfBirth&gt;October 4, 1976&lt;/DateOfBirth&gt;
&lt;/Girl&gt;
&lt;Girl&gt;
&lt;Name&gt;Christy Chung&lt;/Name&gt;
&lt;DateOfBirth&gt;September 19, 1970&lt;/DateOfBirth&gt;
&lt;/Girl&gt;
&lt;/Girls&gt;
</pre>
<p>You can easily query the data from this XML  with the code below. Additionally, you will get the strong-typed variable reference. That means you will see &#8220;Name&#8221; and &#8220;DateOfBirth&#8221; as the properties of &#8220;Girl&#8221; class in intellisense.</p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
namespace ConsoleApplication1 {
class Program {
static void Main(string[] args) {
XDocument xmlSource = XDocument.Load(&quot;Girls.xml&quot;);

var girls = from g in xmlSource.Descendants(&quot;Girl&quot;)
select new
{
Name = g.Element(&quot;Name&quot;).Value,
DateOfBirth = g.Element(&quot;DateOfBirth&quot;).Value
};

foreach (var girl in girls) {
Console.WriteLine(&quot;Name: {0}, Date Of Birth: {1}&quot;,
girl.Name,
girl.DateOfBirth);
}
Console.ReadLine();
}
}
}
</pre>
<p>Yes. This is what Anonymous type, implicitly-typed variables and object initializer are designed for. They are so powerful and very cool with LINQ.  I hope that you now have good understand about what Anonymous type is and how to use it. You should play around with your own scenario or use it in your real project if you have the chance so that you will be more familiar with those new features and will understand more than what I wrote in this tutorial. Good Luck. :)
<div class='kouguu_fb_like_button'><iframe src="http://www.facebook.com/plugins/like.php?href=http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types&#038;layout=standard&#038;show_faces=false&#038;width=450&#038;height=25&#038;action=like&#038;colorscheme=light&#038;" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:25px;"></iframe></div>
<a href='http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types' class='retweet vert' startCount = '0'>C# 3.0 Tutorials: What is Anonymous type?</a>]]></content:encoded>
			<wfw:commentRss>http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>C# 3.0 Tutorials: Implicitly typed local variables</title>
		<link>http://michaelsync.net/2008/03/01/c-30-tutorials-implicitly-typed-local-variables</link>
		<comments>http://michaelsync.net/2008/03/01/c-30-tutorials-implicitly-typed-local-variables#comments</comments>
		<pubDate>Sat, 01 Mar 2008 15:39:57 +0000</pubDate>
		<dc:creator>Michael Sync</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://michaelsync.net/2008/03/01/c-30-tutorials-implicitly-typed-local-variables</guid>
		<description><![CDATA[This is the third article of C# 3.0 tutorial series. We will take a look the first feature called &#8220;Implicitly typed local variables declaration&#8221; in this article. What is Implicitly typed local variable? Implicitly typed local variable is a variable that can be declared without specifying the .NET type explicity. The type of that variable [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F03%2F01%2Fc-30-tutorials-implicitly-typed-local-variables"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F03%2F01%2Fc-30-tutorials-implicitly-typed-local-variables&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>This is the third article of <a href="http://michaelsync.net/2008/02/29/c-30-tutorials-with-visual-studio-2008-for-beginners">C# 3.0 tutorial series</a>. We will take a look the first feature called &#8220;<u>Implicitly typed local variables declaration</u>&#8221; in this article.</p>
<h2>What is Implicitly typed local variable?</h2>
<p>Implicitly typed local variable is a variable that can be declared without specifying the .NET type explicity. The type of that variable will be inferred by the complier from the expression on the right side of initialization statement.</p>
<p>Let me show you the simplest sample of &#8220;Implicitly typed local variable&#8221;. Let&#8217;s think about the way that we declare the variable in C#. Normally, we used to declare the variable with a specific type, right? For example: int i = 1; In implicitly typed variable declaration, you don&#8217;t need to write &#8220;int&#8221;. You don&#8217;t need to set that the type of variable &#8220;i&#8221; is integer type.  Instead, you can use the brand new C# 3.0 keyword &#8220;var&#8221; in that place. So, the code will be like that. &#8220;var i = 1;&#8221; As the value that assigned to &#8220;i&#8221; variable is 1, the type of &#8220;i&#8221; variable will be Integer automatically.</p>
<p>&#8220;var&#8221; is not like object or varient type that has expensive cost. That type of that variable will be changed to the actual .NET type based on what value you have assigned to that variable. As I mentioned in example above, if you assign 1 to i, the type of i will be integer data type.<br />
Let&#8217;s open Visual Studio 2008 and create one C# console application. then, open the Program.cs and type the following code in Main().</p>
<pre class="brush: csharp;">

var i = 1;
</pre>
<p>then, type &#8220;i&#8221;   &#8220;.&#8221; (dot) and check-out the intellisense. You will see it as the screenshot below.  Then, try to declare the int variable (let&#8217;s say &#8220;j&#8221;) in normal way and check what you have in intellisense for that new integer variable &#8220;j&#8221;. You will get exactly the same thing like what you get for variable &#8220;i&#8221;, the implicitly type local variable. That means variable &#8220;i&#8221; become integer type based on the value that we initialize.</p>
<p><img src="http://michaelsync.net/wp-content/uploads/2008/02/implicitly-typed-local-variable-int.jpg" alt="Implicitly typed local variable" /></p>
<pre>Fig: 1.0: the variable "i" as integer data type.</pre>
<p>Okay. Let&#8217;s change the initialized value of variable &#8220;i&#8221; from 1 to &#8220;This is a string&#8221;.</p>
<pre class="brush: csharp;">

var i = &quot;This is a string&quot;;
</pre>
<p>Then,  type &#8220;i&#8221;   &#8220;.&#8221; (dot) and check-out the intellisense again. What you saw in intellisense is changed now. (You can compare both screenshots.)  The type of variable &#8220;i&#8221; has been changed since we have changed the value &#8220;1&#8243; to &#8220;This is a string&#8221; in declaration. So, <u>you can think of &#8220;var&#8221; as a place holder where the compiler will replace the real data type based on what you initialize the variable. </u></p>
<p><img src="http://michaelsync.net/wp-content/uploads/2008/02/implicitly-typed-local-variable-string.jpg" alt="Implicitly typed local variable" /></p>
<pre>Fig: 1.1: the variable "i" as string data type.</pre>
<p>This is the basic things about implicitly typed local variable. You can declare any kinda data type as I mentioned in the example below.</p>
<pre class="brush: csharp;">
var i = 5;
var s = &quot;Hello&quot;;
var d = 1.0;
var numbers = new int[] {1, 2, 3};
var orders = new Dictionary&lt;int,Order&gt;();
</pre>
<h2>Restrictions</h2>
<p>Before you start using the implicitly type variables, you should know that there are a few restrictions of using that type of variables. (Ref: C# 3.0 Specification)</p>
<ol>
<li>The declarator must include an initializer.Unlike normal declarations, you can&#8217;t declare the implicitly type variable without initializing.  For example: The following code won&#8217;t be complied.
<pre class="brush: csharp;">
var test; // ERROR: Implicitly-type local variable must be initialized.
</pre>
</li>
<li>The initializer must be an expression. The initializer cannot be an object or collection initializer by itself, but it can be a new expression that includes an object or collection initializer.You can&#8217;t initialize it with an array. For example ~
<pre class="brush: csharp;">
var test =  { 1, 2, 3 }; //Error    1    Cannot initialize an implicitly-typed local variable with an array initializer
//Error    2    Can only use array initializer expressions to assign to array types. Try using a new expression instead.var test1 = new[] { 1, 2, 3 }; //This is correct!!
</pre>
</li>
<li>The compile-time type of the initializer expression cannot be the null type.
<pre class="brush: csharp;">
var test =  null; //ERROR
</pre>
</li>
<li>If the local variable declaration includes multiple declarators, the initializers must all have the same compile-time type.The implicitly-type local variable cann&#8217;t be initialized with different types more than one time. You can&#8217;t assign the string to varaible &#8220;test&#8221; after initializing with integer value &#8220;1&#8243;.
<pre class="brush: csharp;">
var test = 1;
test = &quot;This is a string&quot;; // ERROR
</pre>
</li>
</ol>
<h2>FAQs</h2>
<p>Whenever I discussed with a few developers about that type of variables, they used to ask me the following questions.</p>
<p><u>Q #1: Why do we need to use &#8220;var&#8221; when we can declare the variable with real data type?</u><strong> </strong></p>
<p>A #1: Yes. You don&#8217;t need to use &#8220;var&#8221; if you know what type you want to use. This is not what it is designed for. If you know the type then use the type.</p>
<p><u>Q #2: Let&#8217;s say I wrote like that &#8220;var myvar = 1;&#8221;. then, C# compiler will assume my variable &#8220;myvar&#8221; is int, right? Actually, I declared it as long.. How can I make the compiler to know my variable &#8220;myvar&#8221; is long data type. What about &#8220;int vs uint&#8221;, &#8220;long vs ulong&#8221; and &#8220;double vs float vs decimal&#8221;??</u></p>
<p>A #2. Initially, I also had that doubt in my head. ( <em>Thanks to Codeproject members who cleared that doubt from my mind.</em>) Actually, this is the variation of previous question. Even though you can declare as the code below, you should not use it because as I told you earlier, if you know the type then use that type.</p>
<pre class="brush: csharp;">
var ui = 1U; // uint
var l = 42L; // long
var big = 1234567890UL; // ulong
var pi = 3.1416; // double
var size = 12.5F; // float
var price = 27.99M; // decimal
</pre>
<h2>Conclusion</h2>
<p>What I would love to say for conclusion is that ~</p>
<ul>
<li>The implicitly typed local variables is not an object or variant.</li>
<li>&#8220;var&#8221; is just like a placeholder where the compiler will replace the actual datatype based on what you initialize with.</li>
<li>You shouldn&#8217;t use implicitly-typed local variable if you know the type.</li>
<li>&#8220;Implicitly-typed local variables&#8221; are the best things to use when you are dealing with anonymous type  or  LINQ.</li>
</ul>
<p>Thanks.
<div class='kouguu_fb_like_button'><iframe src="http://www.facebook.com/plugins/like.php?href=http://michaelsync.net/2008/03/01/c-30-tutorials-implicitly-typed-local-variables&#038;layout=standard&#038;show_faces=false&#038;width=450&#038;height=25&#038;action=like&#038;colorscheme=light&#038;" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:25px;"></iframe></div>
<a href='http://michaelsync.net/2008/03/01/c-30-tutorials-implicitly-typed-local-variables' class='retweet vert' startCount = '0'>C# 3.0 Tutorials: Implicitly typed local variables</a>]]></content:encoded>
			<wfw:commentRss>http://michaelsync.net/2008/03/01/c-30-tutorials-implicitly-typed-local-variables/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>C# 3.0 Tutorials: Object and Collection Initializers</title>
		<link>http://michaelsync.net/2008/03/01/c-30-tutorials-object-and-collection-initializers</link>
		<comments>http://michaelsync.net/2008/03/01/c-30-tutorials-object-and-collection-initializers#comments</comments>
		<pubDate>Sat, 01 Mar 2008 07:53:53 +0000</pubDate>
		<dc:creator>Michael Sync</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://michaelsync.net/2008/03/01/c-30-tutorials-object-and-collection-initializers</guid>
		<description><![CDATA[Howdy everybody! This is the second part of my C# 3.0 tutorial series in my blog. Today, we are gonna talk about object and collection initializers, one of the features of C# 3.0. This feature allows you to initialize the entity object or collection in very easy way that we&#8217;ve never done before. When I [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F03%2F01%2Fc-30-tutorials-object-and-collection-initializers"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F03%2F01%2Fc-30-tutorials-object-and-collection-initializers&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Howdy everybody! This is the second part of <a href="http://michaelsync.net/2008/02/29/c-30-tutorials-with-visual-studio-2008-for-beginners">my C# 3.0 tutorial series</a> in my blog. Today, we are gonna talk about object and collection initializers, one of the features of C# 3.0.</p>
<p>This feature allows you to initialize the entity object or collection in very easy way that we&#8217;ve never done before. When I was working for .NET 1.1 or 2.0 projects, I used to create at least three constructors in each and every entity classes just for making rich-constructors that helps the developers to initialize easily.</p>
<p>For example ~</p>
<pre class="brush: csharp;">
public class Cat {
#region private variable declaration
private int _catID;
private string _name;
#endregion

#region constructors
public Cat() {
}
public Cat(string name) {
_name = name;
}
public Cat(int id, string name) {
_catID = id;
_name = name;
}
#endregion

#region properties
public int CatID{
get{
return _catID;
}
set{
_catID = value;
}
}

public string Name{
get{
return _name;
}
set{
_name = value;
}
}
#endregion

}
</pre>
<p>The reason why I created those constructors is that it make the developer&#8217;s life easier to initialize the object as below.</p>
<pre class="brush: csharp;">
Cat cat = new Cat(1, &quot;Pepsi Ko&quot;);
Cat anotherCat = new Cat(&quot;Ordico&quot;);
</pre>
<p>but just imagine that what if we have 100 entity classes with 20 or more properties. Creating three constructors for those classes would be time-consuming process, isn&#8217;t it? if you are a project manager of the team, you can simply ask your developers to add those constructors in each entity class. but sometime, you don&#8217;t have that level of control all the time. then, you will end-up writing the code below.</p>
<pre class="brush: csharp;">
Cat cat = new Cat();
cat.CatID = 1;
cat.Name = &quot;Pepsi Ko&quot;;

Cat anotherCat = new Cat();
anotherCat.Name = &quot;Ordico&quot;;
</pre>
<p>With C# 3.0, you don&#8217;t need to write those constructors and you don&#8217;t need to ask anyone to create the constructors for you. You can simply initialize the object as below ~</p>
<pre class="brush: csharp;">
Cat cat = new Cat { CatID = 1, Name = &quot;Pepsi Ko&quot; };
Cat anotherCat = new Cat { Name = &quot;Ordico&quot; };
</pre>
<p>It&#8217;s pretty cool, isn&#8217;t it? <u>It saves some of your typing time and copy-n-paste works</u>. :)  If you are using VS 2008, you will get cool intellisense that can tell you what properties you have initialized.</p>
<p><img src="http://michaelsync.net/wp-content/uploads/2008/02/vs-intellisense-for-object-initializer-1.JPG" alt="VS Intellisense for Object Initializer" /></p>
<p><img src="http://michaelsync.net/wp-content/uploads/2008/02/vs-intellisense-for-object-initializer-2.JPG" alt="VS Intellisense for Object Initializer" /></p>
<p>If your entity class has the object of another class as a field then you can also initialize the contained class as below.</p>
<p>Let&#8217;s say you have the class like below ~</p>
<pre class="brush: csharp;">
public class Cat {
public int CatID { get; set; }
public string Name { get; set; }
public List&lt;Cat&gt; Children { get; set; }
}
</pre>
<p>then, you can initialize like below ~</p>
<pre class="brush: csharp;">
Cat mamamCat = new Cat { CatID = 1, Name = &quot;Pepsi Ko&quot;,
Children = new List&lt;Cat&gt;{
new Cat{ CatID =11, Name = &quot;Pussy Lay&quot; },
new Cat{ CatID =12, Name = &quot;Kitty&quot; },
new Cat{ CatID =13, Name = &quot;Soemasoe&quot; }
}
};
</pre>
<p>All right. This is all about object and collection initializer. The advantage of using this feature is that it save some of your time for creating a lot of constructors or initializing the individual property. That&#8217;s all. If you have any comment or suggestion, please let me know. Thank you!
<div class='kouguu_fb_like_button'><iframe src="http://www.facebook.com/plugins/like.php?href=http://michaelsync.net/2008/03/01/c-30-tutorials-object-and-collection-initializers&#038;layout=standard&#038;show_faces=false&#038;width=450&#038;height=25&#038;action=like&#038;colorscheme=light&#038;" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:25px;"></iframe></div>
<a href='http://michaelsync.net/2008/03/01/c-30-tutorials-object-and-collection-initializers' class='retweet vert' startCount = '0'>C# 3.0 Tutorials: Object and Collection Initializers</a>]]></content:encoded>
			<wfw:commentRss>http://michaelsync.net/2008/03/01/c-30-tutorials-object-and-collection-initializers/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>C# 3.0 Tutorials: Auto-Implemented Properties (a.k.a Automatic Properties)</title>
		<link>http://michaelsync.net/2008/02/29/c-30-tutorials-auto-implemented-properties-aka-automatic-properties</link>
		<comments>http://michaelsync.net/2008/02/29/c-30-tutorials-auto-implemented-properties-aka-automatic-properties#comments</comments>
		<pubDate>Fri, 29 Feb 2008 14:30:18 +0000</pubDate>
		<dc:creator>Michael Sync</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://michaelsync.net/2008/02/29/c-30-tutorials-auto-implemented-properties-aka-automatic-properties</guid>
		<description><![CDATA[Note: This is the first part of my C# 3.0 tutorial series. Auto-implemented properties is the C# 3.0 new feature that make property-declaration more concise. It helps you to save some of your time for typing a lot of codes. Please take a look the following code to know how it looks like. class Car [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F02%2F29%2Fc-30-tutorials-auto-implemented-properties-aka-automatic-properties"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F02%2F29%2Fc-30-tutorials-auto-implemented-properties-aka-automatic-properties&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><em>Note: This is the first part of <a href="http://michaelsync.net/2008/02/29/c-30-tutorials-with-visual-studio-2008-for-beginners" title="C# 3.0 Tutorials with Visual Studio 2008 for Beginners" target="_blank">my C# 3.0 tutorial series</a>. </em></p>
<p>Auto-implemented properties is the C# 3.0 new feature that make property-declaration more concise. It helps you to save some of your time for typing a lot of codes. Please take a look the following code to know how it looks like.</p>
<pre class="brush: csharp;">
class Car
{
public string Speed { get; set; }
}
</pre>
<h2>Why Auto-Implemented Properties?</h2>
<p>Looking back the way that we have been doing for creating a property in so many projects, do you notice that you have been writing so many line codes just for creating a simple property? Look at the code below.</p>
<pre class="brush: csharp;">
public class Employee {
private int _id;
private string _firstName;
private string _lastName;

public int ID{
get{
return _id;
}
}

public string FirstName {
get {
return _firstName;
}
set {
_firstName = value;
}
}

public string LastName {
get {
return _lastName;
}
set {
_lastName = value;
}
}
}
</pre>
<p>Code 1.0: Employee class that doesn&#8217;t use auto-implemented properties</p>
<p>This is what we used to create the property in C#. In order to create one simple property, we have to type extra four or five lines of code. So, if you have one hundred properties in different entity classes, you have to type toooo much code just for creating properties.</p>
<p>I think VS IDE team at Microsoft also awared of this situration. That&#8217;s why when they released Visual Studio 2005 with .NET framework 2.0, we got the better way to deal with creating properties. You can simply type &#8220;prop&#8221; and press &#8220;tab&#8221; key twice. then, VS IDE will generate the property for you. Or you can use &#8220;Encapsulate Field&#8221; from &#8220;Refactor&#8221; menu to create the property. Unfortunately, those features are available only in C# project type in VS 2005. If you are using VB.NET project, you won&#8217;t be able to use that feature.</p>
<p>And when Microsoft shipped .NET framework 3.0, the new feature called &#8220;Auto-Implemented Properties (a.k.a Automatic Properties)&#8221; is introduced in Framework 3. It helps you to save some of your typing time for declaring private variable, setting the value to that private variable and returning the value.</p>
<p>Take a look at the class that I have converted from normal class (Code 1.0) to the class with auto-implemented properties. It&#8217;s much shorter, right?</p>
<pre class="brush: csharp;">
class Employee
{
public int ID{ get; private set; } // read-only
public string FirstName { get; set; }
public int LastName { get; set; }
}
</pre>
<p>Code 1.1: Employee class that uses auto-implemented properties</p>
<h2>Conclusion</h2>
<p>Auto-Implemented Properties is one of the most popular features of C# 3.0 and a lot of developers are really happy with that new feature. but you should know that auto-implemented properties are nothing new except it helps you to boost your productivity.</p>
<h2>FAQs</h2>
<p>1. Can &#8220;Auto-implemented Properties&#8221; improve the performace?</p>
<p>No. It is just helping you to type shorter code but it doesn&#8217;t improve the performance since the compiler will generate the same as the way what it generates for normal class that doens&#8217;t have auto-implemented properties.</p>
<p>2. How can I make read-only or write-only auto-implemented properties?</p>
<p>You can make the accessor as private. For example: If you want to make read-only property then You can put &#8220;private&#8221; in setter. You can read more about that in C# 3.0 specification.</p>
<p>It mentioned like below in C# 3.0 specification  ~</p>
<p>When a property is specified as an automatically implemented property, a hidden backing field is automatically available for the property, and the accessors are implemented to read from and write to that backing field.</p>
<p>Because the backing field is inaccessible, it can be read and written only through the property accessors. This means that automatically implemented read-only or write-only properties do not make sense, and are disallowed. It is however possible to set the access level of each accessor differently. Thus, the effect of a read-only property with a private backing field can be mimicked like this:</p>
<pre class="brush: csharp;">
public class ReadOnlyPoint {
public int X { get; private set; }
public int Y { get; private set; }
public ReadOnlyPoint(int x, int y) { X = x; Y = y; }
}
</pre>
<p>Okay. This is all about Auto-Implemented Properties (a.k.a Automatic Properties). If you have any suggestion or comment, please drop a comment in this post. Thank you!
<div class='kouguu_fb_like_button'><iframe src="http://www.facebook.com/plugins/like.php?href=http://michaelsync.net/2008/02/29/c-30-tutorials-auto-implemented-properties-aka-automatic-properties&#038;layout=standard&#038;show_faces=false&#038;width=450&#038;height=25&#038;action=like&#038;colorscheme=light&#038;" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:25px;"></iframe></div>
<a href='http://michaelsync.net/2008/02/29/c-30-tutorials-auto-implemented-properties-aka-automatic-properties' class='retweet vert' startCount = '0'>C# 3.0 Tutorials: Auto-Implemented Properties (a.k.a Automatic Properties)</a>]]></content:encoded>
			<wfw:commentRss>http://michaelsync.net/2008/02/29/c-30-tutorials-auto-implemented-properties-aka-automatic-properties/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>C# 3.0 Tutorials with Visual Studio 2008 for Beginners</title>
		<link>http://michaelsync.net/2008/02/29/c-30-tutorials-with-visual-studio-2008-for-beginners</link>
		<comments>http://michaelsync.net/2008/02/29/c-30-tutorials-with-visual-studio-2008-for-beginners#comments</comments>
		<pubDate>Fri, 29 Feb 2008 14:29:40 +0000</pubDate>
		<dc:creator>Michael Sync</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://michaelsync.net/2008/02/29/c-30-tutorials-with-visual-studio-2008-for-beginners</guid>
		<description><![CDATA[I have been doing C# 3.0 for a while now but I never wrote any tutorial related to C# 3.0 in my blog before. So, I decided to write a few C# 3.0 tutorials while I&#8217;m waiting the release of Silverlight 2.0 beta 1. I also notice that some of my friends from Silverlight Forum [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F02%2F29%2Fc-30-tutorials-with-visual-studio-2008-for-beginners"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F02%2F29%2Fc-30-tutorials-with-visual-studio-2008-for-beginners&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I have been doing C# 3.0 for a while now but I never wrote any tutorial related to C# 3.0 in my blog before. So, I decided to write a few C# 3.0 tutorials while I&#8217;m waiting the release of Silverlight 2.0 beta 1. I also notice that some of my friends from <a href="http://silverlight.net/forums/">Silverlight Forum</a> are so silent lately and they don&#8217;t even so active in the forum. I know that they are busy with preparing to go to <a href="http://visitmix.com/2008/default.aspx">MIX08</a> or learning WPF/Media/Flash/Flex.</p>
<p>In this tutorial series, I will cover the following topics with full of explanations, sample and etc (like my other tutorials in my blog). This tutorials are dedicatedly written for those who already have some experiences with C# 1 or 2 and totally newbie for C# 3.0. You will need to install Visual Studio 2008 to run the sample code.</p>
<h2>Topics</h2>
<ul>
<li><a href="http://michaelsync.net/2008/02/29/c-30-tutorials-auto-implemented-properties-aka-automatic-properties">Auto-Implemented Properties (a.k.a Automatic Properties)</a></li>
<li><a href="http://michaelsync.net/2008/03/01/c-30-tutorials-object-and-collection-initializers">Object and Collection Initializers</a></li>
<li><a href="http://michaelsync.net/2008/03/01/c-30-tutorials-implicitly-typed-local-variables">Implicitly typed local variables</a></li>
<li><a href="http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types">Anonymous types</a></li>
<li>Extension methods</li>
<li>Lambda expressions</li>
<li>Query expressions</li>
<li>Expression trees</li>
</ul>
<p>The links will be updated once I published the tutorial in my blog. Please feel free to let me know if you want me to add something or if you have the suggestion or comment.</p>
<p>You can subscribe <a href="http://michaelsync.net/feed" title="Michael Sync" target="_blank">my feed</a> if you used to read the blog through feed reader. OR, you can give me your email <a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=513083&amp;loc=en_US">here</a> then I will inform you if I post new tutorial in my blog. (Of course, I promise that I won&#8217;t share your mail with anyone and I won&#8217;t be spam you. You will have to activate your mail after putting your email address in <a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=513083&amp;loc=en_US">this link</a>.)
<div class='kouguu_fb_like_button'><iframe src="http://www.facebook.com/plugins/like.php?href=http://michaelsync.net/2008/02/29/c-30-tutorials-with-visual-studio-2008-for-beginners&#038;layout=standard&#038;show_faces=false&#038;width=450&#038;height=25&#038;action=like&#038;colorscheme=light&#038;" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:25px;"></iframe></div>
<a href='http://michaelsync.net/2008/02/29/c-30-tutorials-with-visual-studio-2008-for-beginners' class='retweet vert' startCount = '0'>C# 3.0 Tutorials with Visual Studio 2008 for Beginners</a>]]></content:encoded>
			<wfw:commentRss>http://michaelsync.net/2008/02/29/c-30-tutorials-with-visual-studio-2008-for-beginners/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>SEAMonster: Intelligent Image Resizing Tool</title>
		<link>http://michaelsync.net/2008/02/25/seamonster-intelligent-image-resizing-tool</link>
		<comments>http://michaelsync.net/2008/02/25/seamonster-intelligent-image-resizing-tool#comments</comments>
		<pubDate>Mon, 25 Feb 2008 16:53:38 +0000</pubDate>
		<dc:creator>Michael Sync</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://michaelsync.net/2008/02/25/seamonster-intelligent-image-resizing-tool</guid>
		<description><![CDATA[SEAMonster is the open-source .NET-based implementation of seam carving. Seam carving is an image resizing algorithm developed by Shai Avidan and Ariel Shamir. What that algorithm does is that it changes the dimension of image by intelligently removing pixels from (or adding pixels to) the image. If you are very interested in this algorithm, you [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F02%2F25%2Fseamonster-intelligent-image-resizing-tool"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F02%2F25%2Fseamonster-intelligent-image-resizing-tool&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.codeplex.com/seamonster">SEAMonster</a> is the open-source .NET-based implementation of seam carving. Seam carving is an image resizing algorithm developed by Shai Avidan and Ariel Shamir. What that algorithm does is that it changes the dimension of image by intelligently removing pixels from (or adding pixels to) the image. If you are very interested in this algorithm, you may read it <a href="http://en.wikipedia.org/wiki/Seam_carving">here</a> or download <a href="http://www.seamcarving.com/arik/imret.pdf">this pdf file</a> (20 MB).</p>
<p>Download : <a href="http://www.codeplex.com/seamonster/Release/ProjectReleases.aspx?ReleaseId=10269">Executable</a> or <a href="http://www.codeplex.com/seamonster/SourceControl/ListDownloadableCommits.aspx">Sourcecode</a> </p>
<p><a href="http://www.codeplex.com/seamonster" title="SEAMonster Logo"><img src="http://michaelsync.net/wp-content/uploads/2008/02/seamonster-logo.gif" alt="SEAMonster Logo" /></a></p>
<p>You can watch the power of SEAMonster tool or how Seam Carving algorithm in the video below.</p>
<p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/vIFCV2spKtg&#038;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/vIFCV2spKtg&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
<p>Video 1.1 : Seam Carving for Content-Aware Image Resizing</p>
<p>I noticed that tool since <a href="http://blogs.msdn.com/mswanson">Mike Swanson</a>, technical evangelist at Microsoft, wrote about this in his blog. (<a href="http://blogs.msdn.com/mswanson/archive/2007/10/23/seamonster-a-net-based-seam-carving-implementation.aspx">SEAMonster: A .NET-Based Seam Carving Implementation</a>). I will write about how to use this tool in next article. </p>
<p>Related ~ </p>
<ul>
<li><a href="http://michaelsync.net/2008/01/11/ascgen2-opensource-image-to-text-ascii-converter">Ascgen2 &#8211; OpenSource Image to Text (ASCII) Converter</a></li>
<li><a href="http://michaelsync.net/2008/01/28/bulk-image-downloader-for-wordpress-users">Bulk Image Downloader for WordPress Users</a></li>
<li><a href="http://michaelsync.net/2008/02/24/download-flash-file-with-realplayer">Download Flash file with RealPlayer</a></li>
</ul>
<div class='kouguu_fb_like_button'><iframe src="http://www.facebook.com/plugins/like.php?href=http://michaelsync.net/2008/02/25/seamonster-intelligent-image-resizing-tool&#038;layout=standard&#038;show_faces=false&#038;width=450&#038;height=25&#038;action=like&#038;colorscheme=light&#038;" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:25px;"></iframe></div>
<a href='http://michaelsync.net/2008/02/25/seamonster-intelligent-image-resizing-tool' class='retweet vert' startCount = '0'>SEAMonster: Intelligent Image Resizing Tool</a>]]></content:encoded>
			<wfw:commentRss>http://michaelsync.net/2008/02/25/seamonster-intelligent-image-resizing-tool/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ADO.NET Data Service in Plain English</title>
		<link>http://michaelsync.net/2008/01/29/adonet-data-service-in-plain-english</link>
		<comments>http://michaelsync.net/2008/01/29/adonet-data-service-in-plain-english#comments</comments>
		<pubDate>Tue, 29 Jan 2008 16:42:57 +0000</pubDate>
		<dc:creator>Michael Sync</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://michaelsync.net/2008/01/29/adonet-data-service-in-plain-english</guid>
		<description><![CDATA[I have been using ADO.NET Data Service in Silverlight since Astoria team released the client library for Silverlight. I didn&#8217;t have a particular idea to use that service except this is something new that I like to try. After reading a few article about Astoria, I come to know that I can retrieve the data [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F01%2F29%2Fadonet-data-service-in-plain-english"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F01%2F29%2Fadonet-data-service-in-plain-english&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I have been using ADO.NET Data Service in Silverlight since Astoria team released the client library for Silverlight. I didn&#8217;t have a particular idea to use that service except this is something new that I like to try. After reading a few article about Astoria, I come to know that I can retrieve the data from Astoria service by typing the URL in browser. And we have to use the different HTTP verbs for CRUD operations. That&#8217;s all? I think &#8220;No&#8221;. So, I raised a question in MSDN forum last week. Today, I got very useful and informative reply from Mike Flasko. (<em>Thanks a lot for your reply, Mike.</em>)</p>
<p><a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2746909&amp;SiteID=1" title="ADO.NET Data Service in Plain English  ">Here</a> is the original thread that I posted in MSDN forum. Now, I&#8217;m here to share this information with you all. Hope that you will find it useful.</p>
<p><strong>Question : What is ADO.NET Data Service (Astoria)?</strong></p>
<p>Hello,</p>
<p>Could anyone please explain me about ADO.NET Data Service in plain english without using marketing term?</p>
<p>AFAIK,<br />
-  we can query the data by typing URL in browser.<br />
-  it supports CRUD operations with different HTTP verb.</p>
<p>But I believe that there might be some important reasons why people created this framework.</p>
<ul>
<li>What is the ADO.NET Data Service?</li>
<li>What are the advantages of using ADO.NET Data Service?</li>
<li>What&#8217;s wrong with Web service?</li>
<li>What is the reason why making differnt HTTP verb for CRUD operation?</li>
</ul>
<p>Thanks in advance.<br />
Michael Sync</p>
<p><strong>Answer from  Mike Flasko (Astoria Program Manager [MSFT] )</strong></p>
<p>Hi Michael,</p>
<p>In general the goals of ADO.NET Data Services are to create a simple REST-based framework for exposing data centric services.  We built the framework in part from analysis of traditional websites and then looked at how architectures were changing with the move to AJAX and RIA based applications.  One key observation the team had was that in traditional approaches to web development the information exchanged between a client (ex. a webbrowser) and the mid tier was a combination of presentation + behavior + data (ex. HTML file with javascript and inline HTML tables of data) and that the core interactions to retrieve raw data was between the mid-tier and backend store (ex. SQL server or other).  When we looked at RIA, AJAX, smart client, etc applications it became apparent that these architectures pushed much more &#8220;smarts&#8221; to the client tier where the client first retrieves the presentation + behavior information (as a DLL in the case of a Silverlight application) and then as the user interacts with the client application, the app turns back (ex. background async call) to the mid-tier to retrieve the data needed to drive the user experience.  This is nothing new (separation of presentation + behavior from data), but its interesting to note it now not only a best practice but mandated in the architectures of today’s web and RIA apps. From this we looked at how such clients could consume data from the mid-tier today and how could we help improve the experience for the developer.  A few areas came up:</p>
<ul>
<li>Creating and maintaining rich data oriented services with current approaches requires a significant developer investment</li>
<li>Building generation purpose client libs/tools with current approaches to data centric services is hard</li>
</ul>
<p>For #1, imagine you wanted to expose the data in your CRM database to you client tier application.  Further assume you want to enable typical application scenarios like retrieving sorted views of the data, paging over the data, filtering, etc.  To expose this data as a set of callable remote methods (using current approaches to developing web services) you would need to write a large number of methods to expose each of the entities in your CRM DB (customers, orders, etc) and then add additional methods for each to retrieve entities by key, sort them, page over them, etc etc.  ADO.NET Data Services, addresses this issue by allowing you to declaratively state the contract of such a data centric service, by telling us the schema of the data and having the data services technology automatically create the required remote endpoints, enabling paging, sorting, etc with no code from the developer.  Then as you change your data model, your service endpoints also change.</p>
<p>For #2 above, an interesting artifact of a REST-based approach to web services is that it promotes creating a uniform interface.  That is, how you address items in an ADO.NET Data Service (i.e. how to construct URIs), how to interact with data (using HTTP verbs), etc is the same across any ADO.NET Data Service, regardless of the data it exposes.  This uniform interface enables code reuse against your web services such that one can create reusable client libraries and UI widgets for all their services.  For example, the ADO.NET Data Service team is doing this by shipping .NET , Silver light, AJAX, etc libraries which can talk to any data service.  In addition, this feature (uniform interface) enables us to add features such as LINQ to ADO.NET Data Services since the translation of LINQ query statements to URIs is stable and well known.</p>
<p>This is already probably a bit too long Smile, but in addition to the items noted above, additional advantages of REST-based approaches also apply such as rich integration with HTTP such that you can leverage existing HTTP infrastructure (ex. HTTP Proxies) deployed at large &#8230;</p>
<p>I hope that helps&#8230;.<br />
~ Mike</p>
<p><strong>Here are a few links for those who don&#8217;t know about REST Service.  </strong></p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">REST (Representational State Transfer)</a></li>
<li><a href="http://tomayko.com/articles/2004/12/12/rest-to-my-wife">How I Explained REST to My Wife</a></li>
</ul>
<p>Hope you find it useful.<br />
<strong>Related ~</strong></p>
<ul>
<li><a href="http://michaelsync.net/2008/01/15/consuming-adonet-data-service-astoria-from-silverlight">Consuming ADO.NET Data Service (Astoria) from Silverlight</a></li>
</ul>
<div class='kouguu_fb_like_button'><iframe src="http://www.facebook.com/plugins/like.php?href=http://michaelsync.net/2008/01/29/adonet-data-service-in-plain-english&#038;layout=standard&#038;show_faces=false&#038;width=450&#038;height=25&#038;action=like&#038;colorscheme=light&#038;" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:25px;"></iframe></div>
<a href='http://michaelsync.net/2008/01/29/adonet-data-service-in-plain-english' class='retweet vert' startCount = '0'>ADO.NET Data Service in Plain English</a>]]></content:encoded>
			<wfw:commentRss>http://michaelsync.net/2008/01/29/adonet-data-service-in-plain-english/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ascgen2 &#8211; OpenSource Image to Text (ASCII) Converter</title>
		<link>http://michaelsync.net/2008/01/11/ascgen2-opensource-image-to-text-ascii-converter</link>
		<comments>http://michaelsync.net/2008/01/11/ascgen2-opensource-image-to-text-ascii-converter#comments</comments>
		<pubDate>Sat, 12 Jan 2008 06:20:01 +0000</pubDate>
		<dc:creator>Michael Sync</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Fav Links]]></category>

		<guid isPermaLink="false">http://michaelsync.net/2008/01/11/ascgen2-opensource-image-to-text-ascii-converter</guid>
		<description><![CDATA[I found this awesome opensource image to ASCII converter from lifthacker blog. This project is hosted in SourceForge &#60;link&#62; and is completely written in C#. This project is released under GPL license and you can download the executable and sourcecode from SourceForge with free of charges. Here is the technique used in this tool. Original [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F01%2F11%2Fascgen2-opensource-image-to-text-ascii-converter"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmichaelsync.net%2F2008%2F01%2F11%2Fascgen2-opensource-image-to-text-ascii-converter&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I found this awesome opensource image to ASCII converter from <a href="http://lifehacker.com/337961/convert-pictures-to-text-images-with-ascgen" target="_blank">lifthacker blog</a>. This project is hosted in SourceForge &lt;<a href="http://sourceforge.net/projects/ascgen2/">link</a>&gt; and is completely written in C#. This project is released under GPL license and you can download the executable and sourcecode from SourceForge with free of charges.  <a href="http://en.wikipedia.org/wiki/Dithering#Digital_photography_and_image_processing">Here</a> is the technique used in this tool.</p>
<p><strong>Original Image</strong></p>
<p><img src="http://michaelsync.net/wp-content/uploads/2007/12/tifa.jpg" alt="Tifa - Final Fantasy Girl" /></p>
<p><strong>Generated Image</strong></p>
<p><a href="http://michaelsync.net/demo/ASCII-tifa.html" title="ASCII Girl"><img src="http://michaelsync.net/wp-content/uploads/2007/12/ascii-tifa.gif" alt="ASCII Girl" /></a></p>
<p>The image above is generated by uisng Ascgen2. If you want to take a look the generated HTML version, you can check this link. (Demo : <a href="http://michaelsync.net/demo/ASCII-tifa.html">http://michaelsync.net/demo/ASCII-tifa.html</a> )</p>
<p><strong>Credit</strong> : I got Tifa Lockhart&#8217;s photo from <a href="http://images.google.com">Google Image Search</a>. Full credits go to the original creator.</p>
<p><em>BTW, this girl is animated but I think she is hot. Wat ya say? </em></p>
<p>Related ~</p>
<ul>
<li><a href="http://www.typorganism.com/asciiomatic/">ASCII-O-Matic</a></li>
</ul>
<div class='kouguu_fb_like_button'><iframe src="http://www.facebook.com/plugins/like.php?href=http://michaelsync.net/2008/01/11/ascgen2-opensource-image-to-text-ascii-converter&#038;layout=standard&#038;show_faces=false&#038;width=450&#038;height=25&#038;action=like&#038;colorscheme=light&#038;" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:25px;"></iframe></div>
<a href='http://michaelsync.net/2008/01/11/ascgen2-opensource-image-to-text-ascii-converter' class='retweet vert' startCount = '0'>Ascgen2 &#8211; OpenSource Image to Text (ASCII) Converter</a>]]></content:encoded>
			<wfw:commentRss>http://michaelsync.net/2008/01/11/ascgen2-opensource-image-to-text-ascii-converter/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Script#: C# to Javascript Converter</title>
		<link>http://michaelsync.net/2007/10/29/script-c-to-javascript-converter</link>
		<comments>http://michaelsync.net/2007/10/29/script-c-to-javascript-converter#comments</comments>
		<pubDate>Mon, 29 Oct 2007 16:57:08 +0000</pubDate>
		<dc:creator>Michael Sync</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://michaelsync.net/2007/10/29/script-c-to-javascript-converter</guid>
		<description><![CDATA[Have you heard about Script#? I heard about this toolkit last week even Nikhil started this project last year. I knew that there is a Java-to-Javascript converter called GWT (Google Web Toolkit) in Java World since long time back and I thought that it might be good if we, the C# developers, also have that [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmichaelsync.net%2F2007%2F10%2F29%2Fscript-c-to-javascript-converter"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmichaelsync.net%2F2007%2F10%2F29%2Fscript-c-to-javascript-converter&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><em><strong>Have you heard about Script#? </strong></em>I heard about this toolkit last week even <a href="http://www.nikhilk.net/">Nikhil </a>started this project last year. I knew that there is a Java-to-Javascript converter called <a href="http://code.google.com/webtoolkit/" title="GWT - Google Web Toolkit">GWT (Google Web Toolkit)</a> in Java World since long time back and I thought that it might be good if we, the C# developers, also have that kinda tools for ASP.NET web development. Now, the dream come true. Nikhil created Script# project that can convert the C# code to Javascript. I think it is pretty interesting (and strange ) tool and I wonder how Script# will convert the C# code to Javascript. Anyway, I started learning about Script# on last Friday. I&#8217;m gonna share what I have learnt about it so far. If you are already familiar with this tool, please share your thoughts about this tool. Thanks.</p>
<h3><strong>Introduction</strong></h3>
<p><a href="http://projects.nikhilk.net/Projects/ScriptSharp.aspx">Script#</a> is a compiler that generate the Javascript instead of MSIL (Microsoft Intermediate Language) from C# sourcecode. Like <a href="http://code.google.com/webtoolkit/" title="GWT - Google Web Toolkit">GWT (Google Web Toolkit)</a> that can convert the Java code to browser-compliant JavaScript and HTML, Script# is able to convert the C# codes to Javascript (either human-readable format or compact one). It is the best tool for those who hate to write the Javascript in HTML view.</p>
<p>Sourcecode Download : <a href="http://michaelsync.net/demo/SSharp.zip">SSharp.zip</a></p>
<h3>Example 1 : Getting Started with Script#</h3>
<ul>
<li>Download the ScriptSharp.zip from <a href="http://projects.nikhilk.net/Projects/ScriptSharp.aspx">this link</a>.</li>
<li>Extract it and double-click ScriptSharp.msi to install the Script# (You should note that Script# is currently available for Microsoft Visual Studio 2005. If you wanna use Script# with Visual Studio 2008, please check-out <a href="http://projects.nikhilk.net/Lists/Discussion/Threaded.aspx?RootFolder=%2fLists%2fDiscussion%2fInstall%20Script%20On%20Visual%20Studio%202008%20beta2%20%28Orcas%29%20is%20very%20easy&amp;FolderCTID=0x0120020088F5CDA3C6DA554CB2098DAAD95802EA&amp;TopicsView=http%3A%2F%2Fprojects%2Enikhilk%2Enet%2FLists%2FDiscussion%2FScript%2520Discussions%2Easpx">this post</a>.)</li>
<li>Launch the Microsoft Visual Studio 2005 IDE and let&#8217;s create very sample Script# project<br />
<em>Note: I recommended you to run the VS 2005 IDE as an administrator if you are using Windows Vista series.</p>
<p></em><img src="http://michaelsync.net/wp-content/uploads/2007/10/runasadministrator.jpg" /></li>
<li>Click &#8220;Script#-Enabled Web site&#8221; Project Template from &#8220;New Web Site&#8221; dialog (File&gt;New&gt;Web Site)</li>
<li>We will create one button named &#8220;clickMeButton&#8221; and the div called &#8220;greetingDIV&#8221; within<br />
<form> tag.
<pre class="brush: xml;">
&lt;div&gt;
&lt;input type=&quot;button&quot;  id=&quot;clickmeButton&quot; value= &quot;Click Me&quot; /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div id=&quot;greetingDIV&quot; class=&quot;divbox&quot;&gt;
Hello buddy!!
&lt;/div&gt;
&lt;/div&gt;
</pre>
</p></form>
</li>
<li>Go to the design-view and right-click on &#8220;Scriptlet&#8221; control as picture below<img src="http://michaelsync.net/wp-content/uploads/2007/10/edit-c_-code.jpg" alt="Script# - Scriptlet Control" /></li>
<li>Select &#8220;Edit C# Code&#8221; on content menu.</li>
<li>Paste the following code in Scriptlet Editor
<pre class="brush: csharp;">
using System.DHTML;
using ScriptFX;
using ScriptFX.UI;public class MyScriptlet : IDisposable {private DOMEventHandler _clickHandler;

private MyScriptlet(ScriptletArguments arguments) {
_clickHandler = new DOMEventHandler(OnClickMeButton_Click);

DOMElement clickMeButton = Document.GetElementById(&quot;clickmeButton&quot;);
clickMeButton.AttachEvent(&quot;onclick&quot;, _clickHandler);
}

public static void Main(ScriptletArguments arguments) {
MyScriptlet scriptlet = new MyScriptlet(arguments);

}

public void Dispose() {
if (_clickHandler != null) {
DOMElement okButton = Document.GetElementById(&quot;clickmeButton&quot;);
okButton.DetachEvent(&quot;onclick&quot;, _clickHandler);
_clickHandler = null;
}
}

private void OnClickMeButton_Click() {
DOMElement divGreeting = Document.GetElementById(&quot;greetingDIV&quot;);
divGreeting.Style.Display = &quot;block&quot;;
}
}
</pre>
<p><img src="http://michaelsync.net/wp-content/uploads/2007/10/scriptlet-editor.jpg" alt="Script# - Scriptlet Editor" /></li>
<li>Click &#8220;Save and Close&#8221; on Scriptlet Editor</li>
<li>Build the web application and Press &#8220;F5&#8243; to run the application</li>
<li>(There is one button on the page.) Click this button.</li>
<li>&#8220;Hello Buddy!&#8221; message will be shown as picture below.<img src="http://michaelsync.net/wp-content/uploads/2007/10/example-1.jpg" alt="Script# - Example 1" /></li>
</ul>
<p>That&#8217;s.. You just created one script#-enabled webpage. Do you want to know what code Script# generated from your C# code? It&#8217;s easy. Just go to &#8220;View Source&#8221; and you will see the following script which is generated by Script#.</p>
<pre class="brush: jscript;">
&lt;script type=&quot;text/javascript&quot;&gt;
//&lt;![CDATA[
window.main = function main() {
Type.createNamespace('Scriptlet');

////////////////////////////////////////////////////////////////////////////////
// Scriptlet.MyScriptlet

Scriptlet.MyScriptlet = function Scriptlet_MyScriptlet(arguments) {
this._clickHandler = Delegate.create(this, this._onClickMeButton_Click);
var clickMeButton = $('clickmeButton');
clickMeButton.attachEvent('onclick', this._clickHandler);
}
Scriptlet.MyScriptlet.main = function Scriptlet_MyScriptlet$main(arguments) {
var scriptlet = new Scriptlet.MyScriptlet(arguments);
}
Scriptlet.MyScriptlet.prototype = {
_clickHandler: null,

dispose: function Scriptlet_MyScriptlet$dispose() {
if (this._clickHandler) {
var okButton = $('clickmeButton');
okButton.detachEvent('onclick', this._clickHandler);
this._clickHandler = null;
}
},

_onClickMeButton_Click: function Scriptlet_MyScriptlet$_onClickMeButton_Click() {
var divGreeting = $('greetingDIV');
divGreeting.style.display = 'block';
}
}

Scriptlet.MyScriptlet.createClass('Scriptlet.MyScriptlet', null, IDisposable);

// ---- Do not remove this footer ----
// Generated using Script# v0.4.2.0 (http://projects.nikhilk.net)
// -----------------------------------

ScriptFX.Application.current.run(Scriptlet.MyScriptlet);
}
ScriptHost.initialize([
'App_Scripts/ssfx.Core.js',
'App_Scripts/ssfx.UI.Forms.js'
]);
//]]&gt;
&lt;/script&gt;
</pre>
<p><em>Don&#8217;t you think that the generated Javascript code looks so similar to your C# code that you wrote in Scriptlet Editor?</em> Yes. This is one of the advantages of using Script#. <u>It can generate the human-readable Javascript that has the same structure as your C# code.</u> If you are not sure how to write the object-oriented code in Javascript, you can just write the code in C# with the rich features such as IntelliSense, refactoring, compile-time and let Script# convert the C# code to the object-oriented Javascript code.</p>
<p><em>Note: The sample is already attached in this post. Please check-out &#8220;Example1.aspx&#8221; in zip file.</em></p>
<p>Okay. We&#8217;ve just done one sample with Script#.  As the project is in very early stage, I notice that there are a few weak points and bugs in that project while I&#8217;m learning. And also,<u> I&#8217;m kinda agreed with </u><span class="author fn"><u>Dimitri Glazkov regarding on Script# project.</u> (Check-out his post <a href="http://glazkov.com/blog/agony-of-thousand-puppies/" title="GWT And Now Script#: The Agony of a Thousand Puppies">here</a>.) Anyway, let&#8217;s learn more about Script# and we&#8217;ll see whether we should use it in real project or not.</span></p>
<h3>Example 2 : Script# Ajax</h3>
<ul>
<li>Create the another Script#-enabled project</li>
<li>Add the &#8220;Generic Handler&#8221; to your project and name it &#8220;ExampleWebHandler.ashx&#8221;</li>
<li>Paste the following code in &#8220;ProcessRequest (HttpContext context)&#8221; function.
<pre class="brush: csharp;">
context.Response.ContentType = &quot;text/xml&quot;;
context.Response.Write(&quot;Hi &quot; + HttpUtility.HtmlEncode(context.Request.QueryString[&quot;name&quot;]) + &quot;!&quot;); </pre>
<p><em>Note: What this code does is that write the &#8220;Hi&#8221; after appending the name that came as a parameter in response.<br />
</em></li>
<li>Add one textbox to accept the user inputs, one button to invoke the server-side script and the div for displaying the result
<pre class="brush: xml;">
&lt;div&gt;
Please Enter your name : &amp;nbsp;&amp;nbsp;
&lt;input type=&quot;text&quot; id=&quot;nameTextBox&quot; /&gt; &amp;nbsp;&amp;nbsp;
&lt;input type=&quot;button&quot; id=&quot;sayHiButton&quot; value=&quot;Say Hi!!&quot;/&gt; &lt;br /&gt;&lt;br /&gt;
&lt;div id=&quot;result&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
</pre>
</li>
<li>Add the argument to your scriptlet control. (Right-click on Scriptlet control and select &#8220;Edit&#8221; Arguments. then, Add one member (Name: name and Value: ExampleWebHandler.ashx?name={0}))
<p><img src="http://michaelsync.net/wp-content/uploads/2007/10/edit-arguments.gif" alt="Edit Arguments - ScriptletArgument Collection Editor" /></li>
<li>then, Click &#8220;OK&#8221; to close the &#8220;ScriptletArgument Collection Editor&#8221;</li>
<li>Paste the following code in &#8220;Scriptlet Editor&#8221;
<pre class="brush: csharp;">
using System;
using System.DHTML;
using ScriptFX;
using ScriptFX.UI;
using ScriptFX.Net;

public class MyScriptlet : IDisposable {

private string _urlName;
private DOMEventHandler _clickHandler;
private XMLHttpRequest _request;
DOMElement resultDIV = null;

public static void Main(ScriptletArguments arguments) {
MyScriptlet scriptlet = new MyScriptlet(arguments);
}

public void Dispose() {
if (_clickHandler != null) {
DOMElement okButton = Document.GetElementById(&quot;sayHiButton&quot;);
okButton.DetachEvent(&quot;onclick&quot;, _clickHandler);
_clickHandler = null;
}
if (_request != null) {
_request.Onreadystatechange = (Callback)Delegate.Null;
_request.Abort();
_request = null;
}
}

private MyScriptlet(ScriptletArguments arguments) {
_urlName = arguments.name;

_clickHandler = new DOMEventHandler(OnSayHiButton_Click);

DOMElement clickMeButton = Document.GetElementById(&quot;sayHiButton&quot;);
clickMeButton.AttachEvent(&quot;onclick&quot;, _clickHandler);
}

private void OnSayHiButton_Click() {
InputElement nameTextBox = (InputElement)Document.GetElementById(&quot;nameTextBox&quot;);
resultDIV = Document.GetElementById(&quot;result&quot;);
resultDIV.Style.Display = &quot;block&quot;;

_request = new XMLHttpRequest();
_request.Onreadystatechange = this.OnRequestComplete;
_request.Open(&quot;GET&quot;, String.Format(_urlName, nameTextBox.Value.Escape()), /* async */ true);
_request.Send(null);
}

private void OnRequestComplete() {
if (_request.ReadyState == 4) {
//if (_request.Status == 200) {
_request.Onreadystatechange = (Callback)Delegate.Null;
if (resultDIV != null) {
resultDIV.ClassName =&quot;divbox&quot;;
resultDIV.InnerHTML = _request.ResponseText;
}
_request = null;
// }
}
else {
if (resultDIV != null) resultDIV.InnerHTML = @&quot;&lt;img src=&quot;&quot;./images/indicator_technorati.gif&quot;&quot;&gt;&quot;;
}
}
}
</pre>
<p><em>Note: I assumed that you already have some ideas about Ajax before reading this article.</p>
<p></em></li>
<li>Build the application and run it. (You will see one textbox and one button as you have added on the page.)</li>
<li>Type the name you like</li>
<li>Click &#8220;Say Hi!&#8221; button. (You will see the result as below with the name that you enter.)
<p><img src="http://michaelsync.net/wp-content/uploads/2007/10/example-2.jpg" /></li>
</ul>
<p>This demo is very sample that shows the way how to communicate between Script# code and the Server-side code. You can probably extends the web handler to get the more features as you need for your Script#-enabled application.</p>
<p><strong>Debugging the Script#-enabled application</strong></p>
<p>For IE Users, Go to &#8220;Debug-&gt;Windows-&gt;Script Explorer&#8221;  or Press &#8220;Ctl+Alt+N&#8221; while you are running the project. You will see the list of script files that are included in page. Select the script file that you wanna debug and set the breakpoint. You know <a href="http://www.google.com/search?q=how+to+debug+javascript+with+visual+studio&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t&amp;rls=org.mozilla:en-US:official&amp;client=firefox-a">how to debug the Javascript with Visual Studio 2005</a>, right?</p>
<p>For Firefox Users, Firebug is the best tool for debugging the Javascript.</p>
<p><strong>Yeah. It is so sad to say that you are not able to debug the C# code that you wrote. Instead, you will be debugging the Javascript code which is generated by Script# compiler..  </strong>It makes you feel like debugging the MSIL code after writing the C# in IDE even the generated code is so much like the C# code that you wrote and human-readable but it is by-design so we can do nothing.</p>
<p><strong>Conclusion</strong></p>
<p>I&#8217;m gonna stop learning the Script# project for today. I&#8217;ll read about building the Script# library and Vista Sidebar Gadget and will post them in my blog. For the time being, I do have a few disappointments in using Script#.  However, I will look more information about this project and I will share the conclusion with you.. If you are also learning this project like me, please let me know. We can probably discuss more about this project.. Thanks&#8230;</p>
<p><em><strong>More Information about Script# ~</strong></em></p>
<ul>
<li><a href="http://www.nikhilk.net/ScriptSharpIntro.aspx">Script# &#8211; Introduction</a></li>
<li><a href="http://www.microsoft-watch.com/content/developer/script_vs_google_gwt_may_the_best_ajax_tool_win.html">Script# Vs. Google GWT: May the Best Ajax Tool Win</a></li>
<li><a href="http://glazkov.com/blog/agony-of-thousand-puppies/">GWT And Now Script#: The Agony of a Thousand Puppies</a></li>
</ul>
<div class='kouguu_fb_like_button'><iframe src="http://www.facebook.com/plugins/like.php?href=http://michaelsync.net/2007/10/29/script-c-to-javascript-converter&#038;layout=standard&#038;show_faces=false&#038;width=450&#038;height=25&#038;action=like&#038;colorscheme=light&#038;" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:25px;"></iframe></div>
<a href='http://michaelsync.net/2007/10/29/script-c-to-javascript-converter' class='retweet vert' startCount = '0'>Script#: C# to Javascript Converter</a>]]></content:encoded>
			<wfw:commentRss>http://michaelsync.net/2007/10/29/script-c-to-javascript-converter/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Free Awesome ProgressBar in C#</title>
		<link>http://michaelsync.net/2007/09/06/free-awesome-progressbar-in-c</link>
		<comments>http://michaelsync.net/2007/09/06/free-awesome-progressbar-in-c#comments</comments>
		<pubDate>Thu, 06 Sep 2007 12:58:34 +0000</pubDate>
		<dc:creator>Michael Sync</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://michaelsync.net/2007/09/06/free-awesome-progressbar-in-c</guid>
		<description><![CDATA[SQL Server 2005 Circular Progress Bar Download : http://www.codeproject.com/vb/net/sql2005circularprogress.asp Author : ateece A progress disk similar to that in SQL Server 2005 Download : http://www.codeproject.com/cs/miscctrl/ProgressDisk.asp Author : Amr Elsehemy Status List &#8211; Vista Style Download : http://www.codeproject.com/useritems/Status_List.asp Author : Shahpour Extended .NET Controls Download : http://www.codeproject.com/cs/miscctrl/exdotnet.asp Author : Johnny Hooyberghs Never-ending Progress Bar (C#) Download [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmichaelsync.net%2F2007%2F09%2F06%2Ffree-awesome-progressbar-in-c"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmichaelsync.net%2F2007%2F09%2F06%2Ffree-awesome-progressbar-in-c&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>SQL Server 2005 Circular Progress Bar</strong></p>
<p><img src="http://michaelsync.net/wp-content/uploads/2007/09/sql2005circularprogress.jpg" /></p>
<p>Download : <a href="http://www.codeproject.com/vb/net/sql2005circularprogress.asp">http://www.codeproject.com/vb/net/sql2005circularprogress.asp</a></p>
<p>Author : ateece</p>
<p><strong>A progress disk similar to that in SQL Server 2005 </strong></p>
<p><img src="http://michaelsync.net/wp-content/uploads/2007/09/pd.jpg" height="409" width="497" /></p>
<p>Download : <a href="http://www.codeproject.com/cs/miscctrl/ProgressDisk.asp">http://www.codeproject.com/cs/miscctrl/ProgressDisk.asp</a></p>
<p>Author  : <a href="http://amr-elsehemy.blogspot.com/">Amr Elsehemy</a></p>
<p><strong>Status List &#8211; Vista Style</strong></p>
<p><img src="http://michaelsync.net/wp-content/uploads/2007/09/Screenshot.jpg" height="358" width="425" /></p>
<p>Download : <a href="http://www.codeproject.com/useritems/Status_List.asp">http://www.codeproject.com/useritems/Status_List.asp</a></p>
<p>Author : Shahpour</p>
<p><strong>Extended .NET Controls</strong></p>
<p><img src="http://michaelsync.net/wp-content/uploads/2007/09/exdotnet04.png" height="312" width="424" /></p>
<p>Download :  <a href="http://www.codeproject.com/cs/miscctrl/exdotnet.asp">http://www.codeproject.com/cs/miscctrl/exdotnet.asp</a></p>
<p>Author : Johnny Hooyberghs</p>
<p><strong>Never-ending Progress Bar (C#)</strong></p>
<p><img src="http://michaelsync.net/wp-content/uploads/2007/09/OSProgress.png" height="117" width="421" /></p>
<p>Download : <a href="http://www.codeproject.com/cs/miscctrl/C_NeverEndingPBar.asp">http://www.codeproject.com/cs/miscctrl/C_NeverEndingPBar.asp</a></p>
<p>Author :  GregOsborne</p>
<p><strong>Building a Progress Bar that Doesn&#8217;t Progress </strong></p>
<p><img src="http://michaelsync.net/wp-content/uploads/2007/09/fig01.gif" height="49" width="200" /></p>
<p>Download : <a href="http://msdn.microsoft.com/msdnmag/issues/04/10/AdvancedBasics/default.aspx">http://msdn.microsoft.com/msdnmag/issues/04/10/AdvancedBasics/default.aspx</a></p>
<p>Author : <a href="http://duncanmackenzie.net/">Duncan Mackenzie</a>
<div class='kouguu_fb_like_button'><iframe src="http://www.facebook.com/plugins/like.php?href=http://michaelsync.net/2007/09/06/free-awesome-progressbar-in-c&#038;layout=standard&#038;show_faces=false&#038;width=450&#038;height=25&#038;action=like&#038;colorscheme=light&#038;" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:25px;"></iframe></div>
<a href='http://michaelsync.net/2007/09/06/free-awesome-progressbar-in-c' class='retweet vert' startCount = '0'>Free Awesome ProgressBar in C#</a>]]></content:encoded>
			<wfw:commentRss>http://michaelsync.net/2007/09/06/free-awesome-progressbar-in-c/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
