I have a Try Catch in my code. I would like to know if there is a statement that only executes when no errors are found?
Finally executes with or without error, but I don’t want that…
I have this
Try
My.Computer.FileSystem.DeleteDirectory(txtFolder.Text, FileIO.DeleteDirectoryOption.DeleteAllContents)
Catch ex As Exception
Status(ex.Message)
End Try
Status("Resetted", , 2000)
And I want the last status statement only to show if there were no errors
I think something as simple as this would suffice: