<p>If you want to delete the file, just do this:</p>
<p>If you want to clear its contents:</p>
<p>If you're doing a lot of I/O, get familiar with the static <a href="http://msdn.microsoft.com/en-us/library/system.io.file.aspx"><code>File</code></a> methods.</p>
<p>This tip was originally posted on <a href="http://stackoverflow.com/questions/23640510/How%20can%20I%20delete%20xml%20file%20with%20Xml%20writer?/23640546">Stack Overflow</a>.</p>
Get New Tutorials Delivered to Your Inbox
New tutorials will be sent to your Inbox once a week.