Saving files using OpenFileDialog in C #
<p>i am actually working on an application where a blob file is retrieved from my database, converted to the original file and then saved on the desktop. I would like to know if it is possible to check if a file named "xxx" already exists on the desktop and then it shall prompt me for another name. Here is my code:</p>

<pre><code>myData.Read();

FileSize = myData.GetUInt32(myData.GetOrdinal("filesize"));
rawData = new byte[FileSize];

myData.GetBytes(myData.GetOrdinal("file"), 0, rawData, 0, (int)FileSize);

// must change paths
String desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
fs = new FileStream(@desktopPath + "\\" + myData.GetString("title") + myData.GetString("extension"), FileMode.OpenOrCreate, FileAccess.Write);

myFilePath = desktopPath + "\\" + myData.GetString("title") +myData.GetString("extension");

fs.Write(rawData, 0, (int)FileSize);
fs.Close();
</code></pre>
