I have the follow code but it is awkward. How could I better structure it? Do I have to make my consuming class implement IDisposable and conditionally construct the network acc
protected void ValidateExportDirectoryExists() { var access = useNetworkAccess ? new Core.NetworkAccess(username, password, domain) : null; using (access) { CheckExportDirectoryExists(); } }