Adding an element to a dictionary is not a write usage in R#?


I have a dictionary. Let's say it's defined as Dictionary<string.bool> someDictionary = new Dictionary<string,boo>();

I have a line that adds to it like: someDictionary.Add(....)

When I hit alt-F7 (find usages) on someDictionary and filter by Show Only Write Usages, that line is filtered out. It shows under Read Usages.  Isn't the Add method a write usage?

1 comment
Comment actions Permalink

Hello Abdu Bukres,

So far, ReSharper is not able to track such changes in the dictionary. Please comment or vote for the following issue on our bug tracker to monitor status changes.

Have a great day!


Please sign in to leave a comment.