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

Metric and binary prefix for units of measurement #2

Open
ExM opened this issue Jul 17, 2017 · 0 comments
Open

Metric and binary prefix for units of measurement #2

ExM opened this issue Jul 17, 2017 · 0 comments

Comments

@ExM
Copy link
Owner

ExM commented Jul 17, 2017

Metric and binary prefix for units of measurement
https://en.wikipedia.org/wiki/Metric_prefix
https://en.wikipedia.org/wiki/Binary_prefix

For example:
With configuration class:

class Conf
{
	public long MaxSize;
}

Section

<Conf MaxSize='1Ki' />

Parsed to

settings.Get<Conf>("Conf").MaxSize == 1024

Section

<Conf MaxSize='0.5Ki' />

Parsed to

settings.Get<Conf>("Conf").MaxSize == 512

Section

<Conf MaxSize='1K' />

Parsed to

settings.Get<Conf>("Conf").MaxSize == 1000
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

1 participant