Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

CoreFx #15622 New overload Dictionary.Remove(K, out V)#3270

Merged
jkotas merged 2 commits into
dotnet:masterfrom
WinCPP:CoreFx-15622
Apr 12, 2017
Merged

CoreFx #15622 New overload Dictionary.Remove(K, out V)#3270
jkotas merged 2 commits into
dotnet:masterfrom
WinCPP:CoreFx-15622

Conversation

@WinCPP
Copy link
Copy Markdown
Contributor

@WinCPP WinCPP commented Apr 9, 2017

Changes equivalent to those in dotnet/corelr PR #10203 for the dotnet/corefx Issue #15622, PR #18109

@safern @danmosemsft @jkotas @karelz @stephentoub Please review.

Copy link
Copy Markdown
Member

@safern safern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left two comments that must be addressed before merging. Thanks @WinCPP

return false;
}

public bool Remove(TKey key, out TValue value)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add comments that where added in CoreCLR PR as well?

{
if (key == null)
{
value = default(TValue);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, don't forget to remove this assignment as if we are throwing an Exception it doesn't make sense to change the out parameter value.

@WinCPP
Copy link
Copy Markdown
Contributor Author

WinCPP commented Apr 12, 2017

@safern Thanks much for pointing out. I had forgotten this PR! Please reviewthe changes that I have submitted...

@jkotas
Copy link
Copy Markdown
Member

jkotas commented Apr 12, 2017

LGTM. Thanks!

@jkotas jkotas merged commit 316af2a into dotnet:master Apr 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants