Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why Currency is a struct, not class? #83

Open
ultimaweapon opened this issue Mar 18, 2021 · 3 comments
Open

Why Currency is a struct, not class? #83

ultimaweapon opened this issue Mar 18, 2021 · 3 comments

Comments

@ultimaweapon
Copy link

Just wonder due to it hold a lot of fields, which will cause a large block of memory to copy whenever it got assigned a value.

@gliljas
Copy link

gliljas commented Apr 15, 2021

I think it makes sense, as it's in many ways a value that will be used instead of a Decimal.

@ultimaweapon
Copy link
Author

Seems like you misunderstood what I mean. I mean this one https://www.github.com/DynamicHands/NodaMoney/tree/master/src%2FNodaMoney%2FCurrency.cs, which is a struct to hold currency information.

@gliljas
Copy link

gliljas commented Apr 15, 2021

Indeed I did misunderstand/misread. Yes, that's a good question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants