border
Fast Splash Screen in English Fast Splash Screen po Slovensky
Main page | C# section | VB6 section | PHP section | MySQL section | Supremus.sk



How to delete file in C# .NET


There is an easy way how to delete file permanently.

Source code:
    string path = @"c:\myfolder\MyFile.txt";
    File.Delete(path);

If the specified file does not exist, an exception is not thrown.

Do not forget to add:
using System.IO;


Comments

There are no comments for this article.

Add your comment, and be first.


Add your comment
User language:

Name:

Subject:





Human verification:
Number 159 is

separator

List of articles

How to compare two Strings in C#
SharpDevelop - how to change 'File version'
How to delete file in C#
How to convert String to Int in C#
How to use Hexadecimal numbers in C#
How to convert Hex number to Int in C#

Smart utilities


Webdesign (c) 2009 - 2024 Supremus.sk
border