Click here to Skip to main content
15,887,350 members
Articles / General Programming / Performance
Alternative
Tip/Trick

Do not use "using" for WCF Clients

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
22 May 2011CPOL 8.1K   2   1
Or you can use T4 to generate a static class wrapper around the service. Then your call can look like this:SvcWrapper.Login(username, password);The full explanation and sample code is located here[^].
Or you can use T4 to generate a static class wrapper around the service. Then your call can look like this:

SvcWrapper.Login(username, password);


The full explanation and sample code is located here[^].

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
United States United States
I’m a Software Engineer at Microsoft working on the Azure Portal. Before that I spent about 20 years developed various business applications at a number of different companies. I have a passion for writing clean, scalable code and sharing what I’ve learned with others.

I also help run the Casco Bay .Net User Group

Comments and Discussions

 
GeneralReason for my vote of 5 Great tip, thanks Pin
Patrick Kalkman19-May-11 3:06
Patrick Kalkman19-May-11 3:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.