<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: ICustomFormatter and the ToString( IFormatProvider ) method of Enum</title>
	<atom:link href="http://huddledmasses.org/icustomformatter-and-the-tostring-iformatprovider-method-of-enum/feed/" rel="self" type="application/rss+xml" />
	<link>http://huddledmasses.org/icustomformatter-and-the-tostring-iformatprovider-method-of-enum/</link>
	<description>You can do more than breathe for free...</description>
	<lastBuildDate>Mon, 15 Mar 2010 20:36:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Chui</title>
		<link>http://huddledmasses.org/icustomformatter-and-the-tostring-iformatprovider-method-of-enum/comment-page-1/#comment-18079</link>
		<dc:creator>Chui</dc:creator>
		<pubDate>Fri, 12 May 2006 00:07:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.huddledmasses.org/?p=209#comment-18079</guid>
		<description>You are out of luck.
Decompiling using reflector for Enum type:

[Obsolete(&quot;The provider argument is not used. Please use ToString(String).&quot;)]
public string ToString(string format, IFormatProvider provider)
{
      return this.ToString(format);
}
 
[Obsolete(&quot;The provider argument is not used. Please use ToString().&quot;)]
public string ToString(IFormatProvider provider)
{
      return this.ToString();
}

public string ToString(string format)
{
      if ((format == null) &#124;&#124; (format.Length == 0))
      {
            format = &quot;G&quot;;
      }
      if (string.Compare(format, &quot;G&quot;, StringComparison.OrdinalIgnoreCase) != 0)
      {
            if (string.Compare(format, &quot;D&quot;, StringComparison.OrdinalIgnoreCase) != 0)
            {
                  if (string.Compare(format, &quot;X&quot;, StringComparison.OrdinalIgnoreCase) != 0)
                  {
                        if (string.Compare(format, &quot;F&quot;, StringComparison.OrdinalIgnoreCase) != 0)
                        {
                              throw new FormatException(Environment.GetResourceString(&quot;Format_InvalidEnumFormatSpecification&quot;));
                        }
                        return Enum.InternalFlagsFormat(base.GetType(), this.GetValue());
                  }
                  return this.ToHexString();
            }
            return this.GetValue().ToString();
      }
      return this.ToString();
}</description>
		<content:encoded><![CDATA[<p>You are out of luck.<br />
Decompiling using reflector for Enum type:</p>
<p>[Obsolete(&#8220;The provider argument is not used. Please use ToString(String).&#8221;)]<br />
public string ToString(string format, IFormatProvider provider)<br />
{<br />
      return this.ToString(format);<br />
}</p>
<p>[Obsolete(&#8220;The provider argument is not used. Please use ToString().&#8221;)]<br />
public string ToString(IFormatProvider provider)<br />
{<br />
      return this.ToString();<br />
}</p>
<p>public string ToString(string format)<br />
{<br />
      if ((format  null) || (format.Length  0))<br />
      {<br />
            format = &#8220;G&#8221;;<br />
      }<br />
      if (string.Compare(format, &#8220;G&#8221;, StringComparison.OrdinalIgnoreCase) != 0)<br />
      {<br />
            if (string.Compare(format, &#8220;D&#8221;, StringComparison.OrdinalIgnoreCase) != 0)<br />
            {<br />
                  if (string.Compare(format, &#8220;X&#8221;, StringComparison.OrdinalIgnoreCase) != 0)<br />
                  {<br />
                        if (string.Compare(format, &#8220;F&#8221;, StringComparison.OrdinalIgnoreCase) != 0)<br />
                        {<br />
                              throw new FormatException(Environment.GetResourceString(&#8220;Format_InvalidEnumFormatSpecification&#8221;));<br />
                        }<br />
                        return Enum.InternalFlagsFormat(base.GetType(), this.GetValue());<br />
                  }<br />
                  return this.ToHexString();<br />
            }<br />
            return this.GetValue().ToString();<br />
      }<br />
      return this.ToString();<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
