To delete an existing file using C#.NET
by
Thamilselvanj
on
Dec 19, 2011
Category:
File Handling
|
Views:
108
|
Points:
25
|
Silver ★
|
|
|
Below sample c# code will help you to delete the existing file in the specific place.
using System; using System.IO;
private void DeleteFile() { string FilePath = @"C:\test.xls"; if (File.Exists(FilePath)) { File.Delete(FilePath); } }
|
Like this code? Bookmark and Share:
|
|
|
|
No Response found!
|
|
|
|
|