<?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: Decimal in c# attributes</title>
	<atom:link href="http://salamakha.com/blog/2007/09/21/decimal-in-c-attributes/feed/" rel="self" type="application/rss+xml" />
	<link>http://salamakha.com/blog/2007/09/21/decimal-in-c-attributes/</link>
	<description>Random thoughts on IT</description>
	<lastBuildDate>Fri, 17 Feb 2012 22:44:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Chris Smith</title>
		<link>http://salamakha.com/blog/2007/09/21/decimal-in-c-attributes/comment-page-1/#comment-196</link>
		<dc:creator>Chris Smith</dc:creator>
		<pubDate>Fri, 04 Dec 2009 10:02:35 +0000</pubDate>
		<guid isPermaLink="false">http://salamakha.com/blog/2007/09/21/decimal-in-c-attributes/#comment-196</guid>
		<description>Argh same trouble.  DecimalRangeValidator.  This is an unacceptable crock of shit.</description>
		<content:encoded><![CDATA[<p>Argh same trouble.  DecimalRangeValidator.  This is an unacceptable crock of shit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce Boughton</title>
		<link>http://salamakha.com/blog/2007/09/21/decimal-in-c-attributes/comment-page-1/#comment-195</link>
		<dc:creator>Bruce Boughton</dc:creator>
		<pubDate>Mon, 23 Nov 2009 12:15:03 +0000</pubDate>
		<guid isPermaLink="false">http://salamakha.com/blog/2007/09/21/decimal-in-c-attributes/#comment-195</guid>
		<description>The answer can be found in this Stack Overflow thread: http://stackoverflow.com/questions/507528/use-decimal-values-as-attribute-params-in-c

&quot;This is a CLR restriction. Only primitive constants or arrays of primitives can be used as attribute parameters. The reason why is that an attribute must be encoded entirely in metadata. This is different than a method body which is coded in IL. Using MetaData only severely restricts the scope of values that can be used. In the current version of the CLR, metadata values are limited to primitives, null, types and arrays of primitives (may have missed a minor one).

Decimals while a basic type are not a primitive type and hence cannot be represented in metadata which prevents it from being an attribute parameter.&quot;
-- JaredPar, http://stackoverflow.com/questions/507528/use-decimal-values-as-attribute-params-in-c/507533#507533</description>
		<content:encoded><![CDATA[<p>The answer can be found in this Stack Overflow thread: <a href="http://stackoverflow.com/questions/507528/use-decimal-values-as-attribute-params-in-c" rel="nofollow">http://stackoverflow.com/questions/507528/use-decimal-values-as-attribute-params-in-c</a></p>
<p>&#8220;This is a CLR restriction. Only primitive constants or arrays of primitives can be used as attribute parameters. The reason why is that an attribute must be encoded entirely in metadata. This is different than a method body which is coded in IL. Using MetaData only severely restricts the scope of values that can be used. In the current version of the CLR, metadata values are limited to primitives, null, types and arrays of primitives (may have missed a minor one).</p>
<p>Decimals while a basic type are not a primitive type and hence cannot be represented in metadata which prevents it from being an attribute parameter.&#8221;<br />
&#8211; JaredPar, <a href="http://stackoverflow.com/questions/507528/use-decimal-values-as-attribute-params-in-c/507533#507533" rel="nofollow">http://stackoverflow.com/questions/507528/use-decimal-values-as-attribute-params-in-c/507533#507533</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

