Version Used:
VS 15.5.0
Steps to Reproduce:
using System.Collections.Generic;
using System.Dynamic;
class Program
{
static void Main()
{
// ExpandoObject doesn't have public Add method. Its Add is explicit implementation of IDictionary.
IDictionary<string, object> obj = new ExpandoObject();
obj.Add("string", "v");
obj.Add("int", 1);
obj.Add("object", new { X=1, Y=2 });
}
}
- IDE0028 Quick Action
IDictionary<string, object> obj = new ExpandoObject
{
// Error CS1061 'ExpandoObject' does not contain a definition for 'Add'
{ "string", "v" },
{ "int", 1 },
{ "object", new { X = 1, Y = 2 } }
};
Expected Behavior:
No IDE0028 suggestion.
Actual Behavior:

Version Used:
VS 15.5.0
Steps to Reproduce:
Expected Behavior:
No IDE0028 suggestion.
Actual Behavior: