Click here to Skip to main content
15,886,199 members
Articles / Programming Languages / C# 4.0

A Money type for the CLR

Rate me:
Please Sign up or sign in to vote.
4.90/5 (62 votes)
18 Mar 2013Ms-PL14 min read 194.3K   2.5K   138  
A convenient, high-performance money structure for the CLR which handles arithmetic operations, currency types, formatting, and careful distribution and rounding without loss.

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Money", "Money\Money.csproj", "{F2416D95-7587-4634-8061-D6B01C6163DD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Money.Tests", "Money.Tests\Money.Tests.csproj", "{F11B6673-FDAF-4F81-8CD5-6E0BF3FA4350}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{F2416D95-7587-4634-8061-D6B01C6163DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{F2416D95-7587-4634-8061-D6B01C6163DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{F2416D95-7587-4634-8061-D6B01C6163DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{F2416D95-7587-4634-8061-D6B01C6163DD}.Release|Any CPU.Build.0 = Release|Any CPU
		{F11B6673-FDAF-4F81-8CD5-6E0BF3FA4350}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{F11B6673-FDAF-4F81-8CD5-6E0BF3FA4350}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{F11B6673-FDAF-4F81-8CD5-6E0BF3FA4350}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{F11B6673-FDAF-4F81-8CD5-6E0BF3FA4350}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
Architect
United States United States
I'm a software engineer with 25 years of experience in areas from game and simulation development, enterprise development, systems management, machine learning, real-time and embedded systems development and geospaitial systems development.

You can find more of my work at http://www.codeplex.com and my articles at http://vectordotnet.blogspot.com/ and http://dotnoted.spaces.live.com.

Comments and Discussions