Imports SystemImports System.IOPublic Class DeleteTest Public Shared Sub Main() Dim fi As New FileInfo("temp.txt") Dim fs As FileStream = fi.Create() fs.Close() fi.Delete() End SubEnd Class