Static methods in ServiceContract(WCF)

  • Thread starter Thread starter Hakan Fatih YILDIRIM
  • Start date Start date
H

Hakan Fatih YILDIRIM

How can i declare a static method in servicecontract?Ýs there any
sample? i couldn't find any.

Best Regards,

Hakan Fatih YILDIRIM
MCP
 
No; WCF contracts are interface based, and static methods don't relate
to interfaces.

Marc
 
Not only that, but depending on the instantiation method for the service
at the address with the particular binding, even though you are working with
an object proxy, you might effectively be making static calls (as there will
be no state stored between calls).

Remember, static (in the way you, the OP, are thinking) is a distinctly
OO concept, something which does not translate directly to services in
distributed systems.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top