Example: when making a texture remover, you might get an error saying that File isnt found
Code:
File.Move("C:\Documents and Settings\Owner\Desktop\File.txt", "C:\Documents and Settings\Owner\Desktop\File2.Txt")
Lets say File.txt doesnt exist, then the program will crash, because it cant move a file that isnt there. To fix it
Code:
Try
File.Move("C:\Documents and Settings\Owner\Desktop\File.txt", "C:\Documents and Settings\Owner\Desktop\File2.Txt")
Catch Ex as Exception
MessageBox.Show("File not found")
End Try
When using that code, if File.txt doesnt exist, then it will not crash, but instead pop up a messagebox.