Logout() Method
You use the Logout() method of a DefaultSoapClient object to make the client application sign out from MYOB Advanced.
Syntax
public void Logout()
Example
The following code shows how to make the client
application sign out from MYOB Advanced.
using (var soapClient = new DefaultSoapClient())
{
//Sign in to MYOB Advanced
...
try
{
//Work with MYOB Advanced through the web services API
}
finally
{
//Sign out from MYOB Advanced
soapClient.Logout();
}
}
Usage Notes
For each call of the Login()
method, you must call the Logout() method after you finish your work
with MYOB Advanced
to close the session. Therefore, we recommend that you call the
Logout() method within the finally
block.