In C# I can do this to expose a property via WCF
[ServiceContractAttribute()]
public interface IFoo
{
int Length
{
[OperationContract()] get;
[OperationContract()] set;
}
}
I have to do it that way since OperationContract decorates a method but not a property. I’m working with a legacy interface that I can’t easily change to remove the use of properties.
How do I perform the same thing in vb.net, I can’t figure out what property syntax I would use in the interface.
Unfortunately (as far as I know) VB uses a very simple property syntax for interfaces that does not allow you to specify attributes on the
getorset.