Missing Exception details for System.IO.FileInfo.Replace

Under the remarks section for System.IO.File.Replace in the MSDN documentation there is mention that an exception will be thrown  if the volume(drive) is different between the source and destination paths.

If the sourceFileName and destinationFileName are on different volumes, this method will raise an exception.

There is no mention in the exception section what type of System.IO.IOException you will receive in this case.

I found that when the volume for the destination and the source files differ you will receive:

System.IO.IOException: Unable to move the replacement file to the file to be replaced. The file to be replaced has retained its original name.

System.IO.FileInfo.Replace will also throw the above exception when the destination volume differs from the source file’s volume.  However the Documentation for System.IO.FileInfo.Replace makes no mention of this error condition.

Comments [0]
All comments require the approval of the site owner before being displayed.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview