Cannot specify System.Reflection.DefaultMemberAttribute on type containing an indexer
If a class or other type specifies System.Reflection.DefaultMemberAttribute, it cannot contain an indexed property.
The following sample generates CS0646:
// to resolve, delete System.Reflection.DefaultMemberAttribute or // remove the indexed property [System.Reflection.DefaultMemberAttribute("x")] // CS0646 class MyClass { public int this[int index] { // an indexed property // try the following line instead // public int prop { get { return 0; } } public int x; public static void Main() { } }