dotnet / dotnet/dotnet-api-docs

Example code has runtime error

Open
#1,741 5 comments 0 reactions 0 assignees View on GitHub
area-System.Runtime.CompilerServices doc-bug dotnet-api/prod Pri2
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

[System.ArgumentNullException: Value cannot be null.
Parameter name: key]
at System.Runtime.CompilerServices.ConditionalWeakTable`2.TryGetValue(TKey key, TValue& value)

line: else if (cwt.TryGetValue(mc2, out data))

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 61958f86-854a-f76a-19e1-fbc4b2f20366
* Version Independent ID: 6a9b0e31-d0a6-c930-7959-20ac6f03ec4a
* Content: [ConditionalWeakTable<TKey,TValue> Class (System.Runtime.CompilerServices)](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.conditionalweaktable-2?view=netframework-4.7.2)
* Content Source: [xml/System.Runtime.CompilerServices/ConditionalWeakTable`2.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2.xml)
* Product: **dotnet-api**
* GitHub Login: @rpetrusha
* Microsoft Alias: **ronpet**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.