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

Treat nullable numeric value types as numbers with respect to alignment #4

Open
jpierson opened this issue Mar 1, 2017 · 0 comments

Comments

@jpierson
Copy link
Owner

jpierson commented Mar 1, 2017

Currently the check for numeric types isn't taking into account cases like Nullable<int> / int?. Playing around a little bit in Linqpad it looks like we should be able to do the following. I'm unsure if this would be compatible with .NET Standard 1.2 though given the differences in Reflection APIs.

typeof(Nullable<int>).IsGenericType &&
typeof(Nullable<int>).GetGenericTypeDefinition() == typeof(Nullable<>)
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