tags:

views:

30

answers:

1

Let's say I have a method such as

    [OperationContract(IsOneWay = true)]
    void UpdateIndex(IndexElement[] indexElements);

in an interface.

When I implement

    void UpdateIndex(IndexElement[] indexElements);

in a class file, do I have to repaste the method attribute or will the compiler know from the definition in the interface?

+1  A: 

For WCF interface attributes, you only need to put them on the interface methods, not the implementation. There are actually some different attributes that you can put on the implementation, but the "Contract" attributes only go on the interface.

Andy White