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 CS0617

'reference' is not a valid named attribute argument. Named attribute arguments must be public fields which are not readonly, static or const.

An attempt was made to access a private member of an attribute class.

The following sample generates CS0617:

using System;

[attributeusage(AttributeTargets.Struct|AttributeTargets.Class|AttributeTargets.Interface)]
public class MyClass : Attribute {
   public int Name;
   public MyClass (int sName) {Name = sName; Bad = -1;}
   int Bad;
   // try the following line instead
   // public int Bad;
}

[MyClass(5, Bad=0)] class Class1 {   // CS0617
}

public class MyClass2 {
   public static void Main () {
   }
}