Search code examples
c#wcf

Do WCF Services Expose Properties?


In the interface required to implement a WCF service, I declare the main class with the [ServiceContract()] attribute and any exposed method with [OperationContract()].

How can i expose public properties? Thanks


Solution

  • You can't. That's not how it works. Methods only.