Hello,
I'm working on a Silverlight application that works with WCF services. While loading the service metadata in my browser, I noticed that it provides the following code:
class Test
{
static void Main()
{
myServiceClient client = new myServiceClient();
// Use the 'client' variable to call operations on the service.
// Always close the client.
client.Close();
}
}
The last line says "Always close the client". My question is, when should you close the client in a Silverlight application? Should you close it after your call to "[MyServiceOperation]Async" or should you close it in the "[MyServiceOperation]Completed" event handler?
Thank you,