cs0646.cs 358 B

1234567891011121314151617181920212223242526
  1. // cs0646.cs : Cannot specify the DefaultMember attribute on a type containing an indexer
  2. // Line : 8
  3. using System;
  4. using System.Reflection;
  5. [DefaultMember ("Item")]
  6. public class Foo {
  7. string bar;
  8. public static void Main ()
  9. {
  10. Console.WriteLine ("foo");
  11. }
  12. string this [int idx] {
  13. get {
  14. return "foo";
  15. }
  16. set {
  17. bar = value;
  18. }
  19. }
  20. }