.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> Visual Studio >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Delete a file from Computer using Vb.net

Posted By:Narayanan       Posted Date: May 15, 2013    Points: 40    Category: Visual Studio    URL: http://www.dotnetspark.com  

Here, we will see how to Delete a file from Computer using VB.Net?
 

Syntax:
 
 Kill(Path)


Example:
  
Dim del_File As String = String.Empty
        del_File = <Delete file Path>
        If MessageBox.Show("Are you Sure, Do you want to Delete it", "Gantec", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
            Kill(del_File)
        End If

Happy Coding!

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend