开发者

Cooking Measurements in C# / F#

开发者 https://www.devze.com 2023-03-16 07:28 出处:网络
Do any of you know a library for the representation and calculation of cooking units(Cup, Tablespoon, Gallon...) in C# or F# (especially in regard to culture, metric/开发者_开发技巧imperial)?Units of

Do any of you know a library for the representation and calculation of cooking units (Cup, Tablespoon, Gallon...) in C# or F# (especially in regard to culture, metric/开发者_开发技巧imperial)?


Units of measure are built into the F# language:

http://msdn.microsoft.com/en-us/library/dd233243.aspx

They can be easily extended with custom units, as long as you know conversion ratios.

Edit: Of course, you might end up with some strange unit types to account between differences in weights and volumes (the ratio of 1 cup of flour to 1 cup of water is not the same as the ratio of 100g of flour to 100g of water...)

0

精彩评论

暂无评论...
验证码 换一张
取 消