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

Avoid VB assembly string comparison call where possible #317

Merged
merged 6 commits into from
Jun 2, 2019

Conversation

GrahamTheCoder
Copy link
Member

Followup to #105

In VB's logic ((object) 3) = ((object) 3) returns true
In C#, ((object) 3) == ((object) 3) returns false

Easy to see the appeal of VB's approach for once
TODO: Simplify null coalesce when value coalesced is definitely not null
Using something like the NullableWalker (currently internal in Roslyn), or an open source null tracker would be more effective of course:
https://github.com/mattwar/nullaby/blob/master/src/Nullaby/Analyzer/NullAnalyzer.cs
@GrahamTheCoder GrahamTheCoder changed the title String comparison Avoid VB assembly string comparison call where possible Jun 2, 2019
@GrahamTheCoder GrahamTheCoder merged commit a87ce1d into master Jun 2, 2019
@GrahamTheCoder GrahamTheCoder deleted the string-comparison branch June 2, 2019 17:30
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

Successfully merging this pull request may close these issues.

1 participant