<?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>Code Comments &#187; C#</title>
	<atom:link href="http://code.hammerpig.com/category/c/feed" rel="self" type="application/rss+xml" />
	<link>http://code.hammerpig.com</link>
	<description>Tips and short tutorials on various programming technologies</description>
	<lastBuildDate>Tue, 25 May 2010 14:35:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Override toString() in Python</title>
		<link>http://code.hammerpig.com/tostring-python.html</link>
		<comments>http://code.hammerpig.com/tostring-python.html#comments</comments>
		<pubDate>Thu, 01 Jan 2009 04:08:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Tip]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=506</guid>
		<description><![CDATA[In popular object-oriented languages such as Java and C#, they have a built-in method to each class that allows you to obtain a String representation of that class. They call these methods toString() or ToString(), respectively. You can use the default implementation, which basically gives you the name of the class (not usually very helpful). [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/tostring-python.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Perform HTTP GET in C#</title>
		<link>http://code.hammerpig.com/perform-http.html</link>
		<comments>http://code.hammerpig.com/perform-http.html#comments</comments>
		<pubDate>Tue, 30 Dec 2008 04:56:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Tip]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=497</guid>
		<description><![CDATA[Suppose you have a Web resource that you want to download programmatically (as opposed to doing it manually from a Web browser) from C#. The first thing you need to do is send an HTTP request to the server with the URL (e.g. http://www.google.com). The server will then process the request and send an HTTP [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/perform-http.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find the Mean of an Array of Numbers in C#</title>
		<link>http://code.hammerpig.com/find-the-mean-of-an-array-of-numbers-in-c.html</link>
		<comments>http://code.hammerpig.com/find-the-mean-of-an-array-of-numbers-in-c.html#comments</comments>
		<pubDate>Sun, 28 Dec 2008 20:10:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Tip]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=492</guid>
		<description><![CDATA[Let&#8217;s say you have an array of numbers and want to be able to find the mathematical mean of those numbers in C#. To my knowledge, the .NET Framework does not have a function to do this built in. (Please let me know if you know otherwise.) So I built a method that does this. [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/find-the-mean-of-an-array-of-numbers-in-c.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Find the Sum of an Array of Numbers in C#</title>
		<link>http://code.hammerpig.com/find-the-sum-of-an-array-in-c.html</link>
		<comments>http://code.hammerpig.com/find-the-sum-of-an-array-in-c.html#comments</comments>
		<pubDate>Sun, 28 Dec 2008 14:06:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Tip]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=489</guid>
		<description><![CDATA[Let&#8217;s say you have an array of numbers (either doubles or integers) and want to be able to find the sum of these numbers. To my knowledge, there is not a built-in way to do this in the .NET Framework, so I created a little utility method that does this for doubles and for integers. [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/find-the-sum-of-an-array-in-c.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find the Mathematical Product of Double Array in C#</title>
		<link>http://code.hammerpig.com/find-the-mathematical-product-of-double-array-in-c.html</link>
		<comments>http://code.hammerpig.com/find-the-mathematical-product-of-double-array-in-c.html#comments</comments>
		<pubDate>Sun, 28 Dec 2008 05:06:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Tip]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=487</guid>
		<description><![CDATA[If you have an array of doubles (or floats) in C#, there is no built-in method (that I know of) to find the product of those numbers. The product is where you multiply all of the numbers together. I needed this, so I created a utility method that does this simple operation. See below.

public static [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/find-the-mathematical-product-of-double-array-in-c.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Invoke a Method Dynamically in Python (Reflection)</title>
		<link>http://code.hammerpig.com/how-to-invoke-a-method-dynamically-in-python-reflection.html</link>
		<comments>http://code.hammerpig.com/how-to-invoke-a-method-dynamically-in-python-reflection.html#comments</comments>
		<pubDate>Sun, 28 Dec 2008 02:48:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Reflection]]></category>
		<category><![CDATA[Tip]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=485</guid>
		<description><![CDATA[Sometimes you want to be able to invoke a method dynamically rather than calling it explicitly. Or in other words, let&#8217;s say you have a bunch of methods, and you have a string object telling you which method to execute, but rather than doing a bunch of if statements you want to be able to [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/how-to-invoke-a-method-dynamically-in-python-reflection.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force Collections to Accept Only One Class in C#</title>
		<link>http://code.hammerpig.com/force-collections-to-accept-only-one-class-in-c.html</link>
		<comments>http://code.hammerpig.com/force-collections-to-accept-only-one-class-in-c.html#comments</comments>
		<pubDate>Tue, 09 Dec 2008 04:55:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Collections]]></category>
		<category><![CDATA[Tip]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=406</guid>
		<description><![CDATA[Collections, such as List and ArrayList, in C# used to be able to contain any class. So you could implement the following code without a problem.

ArrayList oldWay = new ArrayList&#40;&#41;;
oldWay.Add&#40;&#34;abc&#34;&#41;;
oldWay.Add&#40;123&#41;;
oldWay.Add&#40;new CustomWhatever&#40;&#41;&#41;;

But sometimes this flexibility caused problems because you might want to limit what could be contained in that list (for example, limit it to string [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/force-collections-to-accept-only-one-class-in-c.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Example of Implementing IEnumerable and IEnumerator in C#</title>
		<link>http://code.hammerpig.com/example-of-implementing-ienumerable-and-ienumerator-in-c.html</link>
		<comments>http://code.hammerpig.com/example-of-implementing-ienumerable-and-ienumerator-in-c.html#comments</comments>
		<pubDate>Tue, 09 Dec 2008 04:32:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Collections]]></category>
		<category><![CDATA[Tip]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/?p=287</guid>
		<description><![CDATA[In the .NET Framework, there are two interfaces designed to allow you to iterate easily over collections of objects as you would typically do in a for loop. Many classes in the .NET Framework have implemented these interfaces and do their work behind the scenes so you don&#8217;t have to worry about how it is [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/example-of-implementing-ienumerable-and-ienumerator-in-c.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Publishing to a WordPress Blog via XML-RPC (Conclusion)</title>
		<link>http://code.hammerpig.com/publishing-to-a-wordpress-blog-via-xml-rpc-conclusion.html</link>
		<comments>http://code.hammerpig.com/publishing-to-a-wordpress-blog-via-xml-rpc-conclusion.html#comments</comments>
		<pubDate>Thu, 20 Nov 2008 19:25:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[XmlRpc]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/publishing-to-a-wordpress-blog-via-xml-rpc-conclusion.html</guid>
		<description><![CDATA[Please refer to this post for some background.
This series of posts has demonstrated how you can send XML-RPC requests to a WordPress server and get back responses. This allows you to do things like automatically post blog entries, modify them, delete them, etc. This is the type of thing that blogging editors do so you [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/publishing-to-a-wordpress-blog-via-xml-rpc-conclusion.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Publishing to a WordPress Blog via XML-RPC (Part 8)</title>
		<link>http://code.hammerpig.com/publishing-to-a-wordpress-blog-via-xml-rpc-part-8.html</link>
		<comments>http://code.hammerpig.com/publishing-to-a-wordpress-blog-via-xml-rpc-part-8.html#comments</comments>
		<pubDate>Wed, 19 Nov 2008 19:28:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[XmlRpc]]></category>

		<guid isPermaLink="false">http://code.hammerpig.com/publishing-to-a-wordpress-blog-via-xml-rpc-part-8.html</guid>
		<description><![CDATA[Please refer to this post for some background.
Now that all the pieces are in place, a class called WordPressClient brings it all together. It has methods that correspond with some of the tasks you might try to accomplish (such as creating a new post, deleting a post, adding a category, etc.).

using System;
using System.Collections.Generic;
using System.Text;
&#160;
namespace Piccolo.Common
&#123;
	public [...]]]></description>
		<wfw:commentRss>http://code.hammerpig.com/publishing-to-a-wordpress-blog-via-xml-rpc-part-8.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
