How to Delete File using VB.Net

0
255

This tutorial is all about How to Delete File using VB.Net  With this tutorial about How to Delete File using VB.NetSo let’s get started:

  • This tutorial is a continuation of How to Copy a File using VB.Net
  • Add button from the toolbox.
  • Then add this code to the delete button.
    [vbnet] Dim a As String
    a = txtdestination.Text
    My.Computer.FileSystem.DeleteDirectory(a, FileIO.DeleteDirectoryOption.DeleteAllContents)
    MsgBox(“Deleted file Succesfully”)
    [/vbnet]
  • Finally Click F5 to run Program.
    Output:

 

If you have any comments or suggestion about on How to Delete File using VB.Net , Please Feel Free to contact our webpage.

Download How to Delete File using VB.Net Code Here

Other articles you might read also:

Facebook Comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.