The WCF client is one-time, so, with the exception of a few caveats, you can use using:
using(MyClient client = new MyClient()) {
client.DoStuff();
}
But there is a big problem with this; Disposeon the client, WCF actually throws if it is erroneous (losing the original exception). There is a good workaround here , or I wrote a blog post about this.
source
share