NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error CS0609

Cannot set the name attribute on an indexer marked override

The name attribute cannot be applied to an indexed property that is an override.

The following sample generates CS0609:

using System;

public class idx {
   public int this[int iPropIndex] {
      get {
         return 0;
      }
      set {
      }
   }
}

public class MonthDays : idx {
   [name("MonthInfoIndexer")]   // CS0609, delete to resolve this CS0609
   public override int this[int iPropIndex] {
      get {
         return 0;
      }
      set {
      }
   }
}
   
public class test {
   public static void Main( string[] args ) {
   }
}

See Also

Indexers