Find Usages shows 'dynamic usages' - what is this and can it be turned off?

Find Usages sometimes splits the results into 'usages' and 'dynamic usages' (see below)

Some items are unique in each group, some are duplicated.

I don't like this at all, a usage is a usage. How can you simply show ALL usages grouped together? (that is, turn off 'dynamic usages')



We fixed this problem on friday. In our repro there was a problem with object initializer. If in your case usages are not in object initializers please tell us which  usages were mistakenly classified as dynamic.


Sergey, are you saying that the correct behavior is any usage inside an object initializer should be shown under dynamic usages?

If yes, why is this? For example

someObject = new SomeObject( );
someObject.Field1 = x;


someObject = new SomeObject { Field1 = x };

Why would you have these 2 distinct usages of Field1 show up in different categories of usages?

Can you turn 'dynamic usages' off ?


Wallace, your sample is exactly the case where the problem was fixed. Currently only one regular usage is shown for the object initializer.

Btw, 'dynamic' usage is something like following:
dynamic xx;
var f = xx.Field1;
In this case we can not say exactly if it is a usage or not.


thanks for clarifying. i thought in your original statement you were implying it was normal for object initializers usages to appear in dynamic usages!


Please sign in to leave a comment.