I would support one of the other answers - they are almost true.
using (YourService service = new YourService())
{
service.Url = "http://some.other.url/";
service.SomeUsefulMethod();
}
If the block being used is not used and an exception is thrown, then resources such as network connections may be skipped.
source
share