Overwrite existing XML file if it alreadly exists
问题 I am trying to overwrite an existing xml file if it already exists. I am using the code below to check if the file exists and then overwrite it if it does. The existing file is hidden so I am unhiding it before attempting to overwrite. The changes are not occuring to the file and the overwriting is not working however. Here is the code I am using below minus the part where I am writing the new xml data. if(File.Exists(filePath)) { File.SetAttributes(filePath,FileAttributes.Normal);