<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>MoneyType Forum Rss Feed</title><link>http://www.codeplex.com/MoneyType/Thread/List.aspx</link><description>MoneyType Forum Rss Description</description><item><title>New Post: Quick code scan feedback</title><link>http://www.codeplex.com/MoneyType/Thread/View.aspx?ThreadId=32424</link><description>&lt;div style="line-height: normal;"&gt;Hi there codekaizen - a couple of thoughts.&lt;br&gt;
&lt;br&gt;
What you say about System.Decimal isn't really accurate - it's a good
type for representing Money and has the advantage of easily mapping to
a database. Take a look &lt;a href="http://blogs.msdn.com/bclteam/archive/2007/05/29/bcl-refresher-floating-point-types-the-good-the-bad-and-the-ugly-inbar-gazit-matthew-greig.aspx "&gt;here&lt;/a&gt; for a full explanation. How does this money class map to the database?&lt;br&gt;
&lt;br&gt;
Names for simple &lt;a href="http://msdn.microsoft.com/en-us/library/ms229058.aspx"&gt;enums&lt;/a&gt; shouldn't be pluralised.&lt;br&gt;
&lt;br&gt;
You &lt;strong&gt;really &lt;/strong&gt;need the mainline usage code samples on the project home page.
Few people have the time it takes to look at the source code to
initially evaluate this (including me!).&lt;br&gt;
&lt;br&gt;
Thanks! Pete.
&lt;/div&gt;</description><author>sumothecat</author><pubDate>Wed, 20 Aug 2008 11:57:47 GMT</pubDate><guid isPermaLink="false">New Post: Quick code scan feedback 20080820115747A</guid></item><item><title>New Post: Quick code scan feedback</title><link>http://www.codeplex.com/MoneyType/Thread/View.aspx?ThreadId=32424</link><description>&lt;div style="line-height: normal;"&gt;Hey codekaizen,&lt;br&gt;
&lt;br&gt;
As you reported on &lt;a href="http://thinkarchitecture.blogspot.com"&gt;my blog&lt;/a&gt;, we both published a .NET Money implementation on exactly the same day. I’m still amazed! ;) &lt;br&gt;
&lt;br&gt;
I did a quick scan of your implementation this weekend. I really like the completeness of your code. The completeness of the type converters and the implementation of IFormattable.&amp;nbsp; Also, your test suite looks nice and complete.&lt;br&gt;
&lt;br&gt;
By your comment on my implementation, you also got me to think and do some extra research on the best way to store monetary values and the best way to do calculations with them. Reading more, I got to think that it might indeed be wise to follow your path and use a two integers two represent the value (one for the whole number and the other for that fraction). In essence, by using an int64 for the whole number and an int32 for the fraction, you’ve created a fixed point 96 bit decimal. I’m using the regular Decimal type, which is a floating point type. I’m still not sure, however, if it being a floating point type is such a bad thing. First of all, the decimal point can be fixed per object instance. Second, if you need the extra precision, you can have it with the same type. Literature (like &lt;a href="http://www2.hursley.ibm.com/decimal/decifaq1.html#needed"&gt;this from IBM&lt;/a&gt;) suggest a theoretic need for 2191(!) decimal places, but settles for 25-30 decimal places being enough for almost all cases. With the Decimal type you can at least reach a precision of 28 decimal places, but with the two-integer solution you’re always stuck with a maximum precision of 9 decimal places. &lt;br&gt;
&lt;br&gt;
Reading all this, it became clear to me that I got some arithmetic sorting out to do with my implementation, which mainly focuses on easy creation and storage of monetary values. I’m going to puzzle a little more on this for my version 2 implementation.&lt;br&gt;
&lt;br&gt;
Anyway, one last thing: I’m not sure your approach of adding the currency to the monetary value is “inviting” enough. The way a user of your type needs to address a certain currency code seems a little verbose (mainly judging from your tests). Although, in all honesty, I have not gotten around to dive deeply into that yet.&lt;br&gt;
&lt;br&gt;
Keep up the good work!&lt;br&gt;
&lt;br&gt;
Pascal.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;</description><author>plind</author><pubDate>Mon, 28 Jul 2008 19:38:00 GMT</pubDate><guid isPermaLink="false">New Post: Quick code scan feedback 20080728073800P</guid></item></channel></rss>