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 CS0643

'arg' duplicate named attribute argument

A parameter, arg, on a user-defined attribute was specified twice.

The following sample generates CS0643:

using System;
using System.Interop;

[attributeusage(AttributeTargets.Class)]
public class MyAttribute : Attribute {
   public MyAttribute() {
   }

   public int x;
}

[MyAttribute(x = 5, x = 6)]   // CS0643, error setting x twice
// try the following line instead
// [MyAttribute(x = 5)]
class MyClass {
}

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