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

[Bug] if an Enum field is optional and has null value, the TryGet function should return false but not true. #44

Open
JustusPan opened this issue Dec 14, 2022 · 1 comment

Comments

@JustusPan
Copy link

image
if an Enum field is optional, when it's value is null
fields.TryGetEnum("KeyType", out var keyType)
then the return value of this TryGet should be false
but currently it returns true

@Cammin
Copy link
Owner

Cammin commented Dec 14, 2022

In the XML documentation and the API docs, the return value is described as returning true if the field exists.
image

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