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

Optional might need a .Value property #5

Open
csMACnz opened this issue Aug 21, 2016 · 1 comment
Open

Optional might need a .Value property #5

csMACnz opened this issue Aug 21, 2016 · 1 comment

Comments

@csMACnz
Copy link
Owner

csMACnz commented Aug 21, 2016

Casting is not the best way to access a value. Having .Value might be ok, if it is documented that it throws exception if does not have a value. ValueOrDefault makes sense, but not after a HasValue check.

@csMACnz
Copy link
Owner Author

csMACnz commented Aug 21, 2016

ValueOrPanic?

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