If I use System.IO.File.Open with FileMode.CreateNew, and the file
already exists I get an IOException. Ok... but there is no specific
exception for "file already exists", so how do I determine
programatically that that was indeed the cause?
doug mansell - 05 Jan 2007 07:00 GMT
> If I use System.IO.File.Open with FileMode.CreateNew, and the file
> already exists I get an IOException. Ok... but there is no specific
> exception for "file already exists", so how do I determine
> programatically that that was indeed the cause?
oh silly me...
System.Runtime.InteropServices.Marshal.GetHRForException