Which method is used to delete a file in VB.NET?

 Posted by Abhisek on 1/21/2010 | Category: VB.NET Interview questions | Views: 3605

Kill(File name with path) :- This method deletes the said file/files from the disk. The name of the file
to be deleted is passed to this method as string type arguments. Files are simply deleted and not moved to recycle-bin. The use of wild card(* and /) is permitted in this function.

This will delete the file abc.txt locates in C:\Files\

This will delete all the files with .txt extension from C:\Files\

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response