Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / December 2007

Tip: Looking for answers? Try searching our database.

Static methods in ServiceContract(WCF)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hakan Fatih YILDIRIM - 31 Dec 2007 07:07 GMT
How can i declare a static method in servicecontract?İs there any
sample? i couldn't find any.

Best Regards,

Hakan Fatih YILDIRIM
MCP
Marc Gravell - 31 Dec 2007 09:35 GMT
No; WCF contracts are interface based, and static methods don't relate
to interfaces.

Marc
Nicholas Paldino [.NET/C# MVP] - 31 Dec 2007 14:54 GMT
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.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> No; WCF contracts are interface based, and static methods don't relate
> to interfaces.
>
> Marc

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.