<?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>Mystalia Studios &#187; human</title>
	<atom:link href="http://www.mystalia.net/tag/human/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mystalia.net</link>
	<description>Coding Studio</description>
	<lastBuildDate>Fri, 19 Mar 2010 01:22:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Human Readable Filesizes in C#</title>
		<link>http://www.mystalia.net/2008/05/human-readable-filesizes-in-c/</link>
		<comments>http://www.mystalia.net/2008/05/human-readable-filesizes-in-c/#comments</comments>
		<pubDate>Mon, 12 May 2008 00:12:32 +0000</pubDate>
		<dc:creator>Mystalia</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[bytes]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[filesize]]></category>
		<category><![CDATA[human]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[readable]]></category>

		<guid isPermaLink="false">http://www.mystalia.net/?p=5</guid>
		<description><![CDATA[Apparently this proved a challenge for google, so I converted and simplified some PHP code I found. This method will turn any byte into a human readable string, handy when dealing with files. public string ConvertBytes(long Bytes) { &#160; string[] units = new string[] { &#34;Bytes&#34;, &#34;KB&#34;, &#34;MB&#34;, &#34;GB&#34;, &#34;TB&#34;, &#34;PB&#34; }; &#160; int i; [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently this proved a challenge for google, so I converted and simplified some PHP code I found.<br />
This method will turn any byte into a human readable string, handy when dealing with files.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">public string ConvertBytes(long Bytes)<br />
{<br />
&nbsp; string[] units = new string[] { &quot;Bytes&quot;, &quot;KB&quot;, &quot;MB&quot;, &quot;GB&quot;, &quot;TB&quot;, &quot;PB&quot; };<br />
&nbsp; int i;<br />
&nbsp; for (i = 0; Bytes &gt; 1024; i++) { Bytes /= 1024; }<br />
&nbsp; return Bytes.ToString() + &quot; &quot; + units[i];<br />
}</div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.mystalia.net/2008/05/human-readable-filesizes-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
