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

Bit flag enum calculator #1470

Open
vanillajonathan opened this issue Dec 7, 2024 · 0 comments
Open

Bit flag enum calculator #1470

vanillajonathan opened this issue Dec 7, 2024 · 0 comments
Labels
feature Feature / Tool request or idea untriaged

Comments

@vanillajonathan
Copy link

What feature or new tool do you think should be added to DevToys?

A tool to be able to find out what value is used if you pick certain variants on a enum.

Why do you think this is needed?

I have a number which is the value of a bit flag enum but I don't know which enum values that corresponds too.

I have a set of enum variants but I don't know which number the enum represent.

Solution/Idea

[Flags]
enum Weekdays
{
    Monday = 1,
    Tuesday = 2,
    Wednesday = 4,
    Thursday = 8,
    Friday = 16,
    Saturday = 32,
    Sunday = 64
}

So when I click on the checkboxes it calculate the enum value and displays the number in the number input box.

If I type a number in the number input box it checks the appropriate checkboxes.

Comments

No response

@vanillajonathan vanillajonathan added feature Feature / Tool request or idea untriaged labels Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature / Tool request or idea untriaged
Projects
None yet
Development

No branches or pull requests

1 participant