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

<channel>
	<title>Bobobobo's Weblog &#187; Cs</title>
	<atom:link href="http://bobobobo.wordpress.com/category/cs/feed/" rel="self" type="application/rss+xml" />
	<link>http://bobobobo.wordpress.com</link>
	<description>technology and the internets</description>
	<lastBuildDate>Mon, 30 Nov 2009 16:56:23 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='bobobobo.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/0e8d17c68f90a18a1e89a776717e00e2?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Bobobobo's Weblog &#187; Cs</title>
		<link>http://bobobobo.wordpress.com</link>
	</image>
			<item>
		<title>Get numerical value of enum</title>
		<link>http://bobobobo.wordpress.com/2009/02/08/get-numerical-value-of-enum/</link>
		<comments>http://bobobobo.wordpress.com/2009/02/08/get-numerical-value-of-enum/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 01:54:56 +0000</pubDate>
		<dc:creator>bobobobo</dc:creator>
				<category><![CDATA[Cs]]></category>
		<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://bobobobo.wordpress.com/?p=643</guid>
		<description><![CDATA[Just cast it (int)enumVal:



enum BodyType
{
  Fat,
  Thin,
  Musclebound = 500,
  Anorexic
} ;

class Program
{
  static void Main( string[] args )
  {
    BodyType debbie = BodyType.Fat ;
    BodyType john = BodyType.Anorexic ;
    BodyType harold = BodyType.Thin ;

    Console.WriteLine( "Debbie [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=643&subd=bobobobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just cast it <kbd>(int)enumVal</kbd>:</p>
<blockquote>
<pre>

enum BodyType
{
  Fat,
  Thin,
  Musclebound = 500,
  Anorexic
} ;

class Program
{
  static void Main( string[] args )
  {
    BodyType debbie = BodyType.Fat ;
    BodyType john = BodyType.Anorexic ;
    BodyType harold = BodyType.Thin ;

    Console.WriteLine( "Debbie is " + debbie + ".  Numerical value: " + (int)debbie ) ;
    Console.WriteLine( "john is " + john + ".  Numerical value: " + (int)john ) ;
    Console.WriteLine( "harold is " + harold + ".  Numerical value: " + (int)harold ) ;
  }
}
</pre>
</blockquote>
Posted in Cs, misc  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bobobobo.wordpress.com/643/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bobobobo.wordpress.com/643/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bobobobo.wordpress.com/643/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bobobobo.wordpress.com/643/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bobobobo.wordpress.com/643/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bobobobo.wordpress.com/643/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bobobobo.wordpress.com/643/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bobobobo.wordpress.com/643/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bobobobo.wordpress.com/643/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bobobobo.wordpress.com/643/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=643&subd=bobobobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bobobobo.wordpress.com/2009/02/08/get-numerical-value-of-enum/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a4ec51727310397c9e592dd84ae74dc2?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">bobobobo</media:title>
		</media:content>
	</item>
		<item>
		<title>htons in c#, htonl in c#</title>
		<link>http://bobobobo.wordpress.com/2009/02/03/htons-in-c-htonl-in-c/</link>
		<comments>http://bobobobo.wordpress.com/2009/02/03/htons-in-c-htonl-in-c/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 14:37:48 +0000</pubDate>
		<dc:creator>bobobobo</dc:creator>
				<category><![CDATA[Cs]]></category>

		<guid isPermaLink="false">http://bobobobo.wordpress.com/?p=629</guid>
		<description><![CDATA[htons in c#
htonl in c#
HostToNetworkOrder function resides in the System.Net.IPAddress object (what a weird place to put it!)
3 overloads are provided:


System.Net.IPAddress.HostToNetworkOrder( short val )
System.Net.IPAddress.HostToNetworkOrder( int val )
System.Net.IPAddress.HostToNetworkOrder( long val )


Sending binary data in C#
Use the BitConverter class


using System ;
using System.Net ;

class Program
{
  static void Main( string[] args )
  {
    int [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=629&subd=bobobobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h1>htons in c#</h1>
<h1>htonl in c#</h1>
<p><a href="http://msdn.microsoft.com/en-us/library/system.net.ipaddress.hosttonetworkorder.aspx">HostToNetworkOrder function</a> resides in the System.Net.IPAddress object (what a weird place to put it!)</p>
<p>3 overloads are provided:</p>
<blockquote>
<pre>
System.Net.IPAddress.HostToNetworkOrder( short val )
System.Net.IPAddress.HostToNetworkOrder( int val )
System.Net.IPAddress.HostToNetworkOrder( long val )
</pre>
</blockquote>
<h1>Sending binary data in C#</h1>
<p>Use the BitConverter class</p>
<blockquote>
<pre>
using System ;
using System.Net ;

class Program
{
  static void Main( string[] args )
  {
    int val = 0x0112A380 ;
    val = IPAddress.HostToNetworkOrder( val );

    Console.WriteLine("Val is {0}", val ) ;
    Console.WriteLine( "Little endian? " + BitConverter.IsLittleEndian ) ;

    byte[] bytes = BitConverter.GetBytes( val );
    foreach( byte b in bytes )
    {
      Console.WriteLine( b );
    }
  }
}
</pre>
</blockquote>
Posted in Cs  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bobobobo.wordpress.com/629/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bobobobo.wordpress.com/629/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bobobobo.wordpress.com/629/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bobobobo.wordpress.com/629/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bobobobo.wordpress.com/629/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bobobobo.wordpress.com/629/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bobobobo.wordpress.com/629/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bobobobo.wordpress.com/629/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bobobobo.wordpress.com/629/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bobobobo.wordpress.com/629/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bobobobo.wordpress.com&blog=2331964&post=629&subd=bobobobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bobobobo.wordpress.com/2009/02/03/htons-in-c-htonl-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a4ec51727310397c9e592dd84ae74dc2?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">bobobobo</media:title>
		</media:content>
	</item>
	</channel>
</rss>