[Mono-dev] [PATCH] Added Decimal.TryParse Methods

Michael Schurter michael at synthesyssolutions.com
Wed Sep 6 15:12:23 EDT 2006


Attached is a patch to implement the 2 Decimal.TryParse methods.  I 
wrote very little new code.  I turned Decimal.stripStyles into an 
internal Parse method that each Parse/TryParse method wraps.  I stole 
the idea/structure from Double.cs.

This is my first Mono patch, so I'm sure I did lots wrong.  The new 
internal Decimal.Parse method could probably use some refactoring.  I 
wrote (and attached) a test case, and it outputs exactly the same on 
Mono (trunk + my patch) and MS.NET 2.0.

I'm a Windows developer and work and Linux user at home.  So I'm very 
interested in Mono, but the whole build system is agonizing to me.  I 
found myself running "make && sudo make install" on Mono just to test my 
tiny changes to corlib/System/Decimal.cs.  There has to be a better way, 
but makefiles are a complete mystery to me.

I think if someone wrote a HOWTO to help the Windows developer 
demographic transition to the Linux/Mono/Makefile/NUnit world, you would 
see more patches being submitted from those of us stuck using Microsoft 
products at work.

Hope this helps,

-- 
Michael Schurter
Synthesys Solutions
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Decimal.cs.diff
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060906/f74e8285/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060906/f74e8285/attachment-0001.pl 


More information about the Mono-devel-list mailing list