Open jeroenvervaeke opened 2 years ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Thanks for opening the issue @jeroenvervaeke . Since you have a repro and have worked out the fix, would you be willing to submit a Pull request with the fix?
Page in the documentation: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.conditionalweaktable-2
I was about to create a PR for the code snippet on the page about
ConditionalWeakTable<TKey,TValue>
because it does not compile properly.This is the code snippet I'm talking about:
This line is incorrect:
and should be:
However, after running the code in the example the output I got was:
Instead of the desired
I'm not sure if this is a bug in dotnet or not, however the documentation is not in sync with the actual result so I decided to create a PR here.
Dotnet version: