title: Check if file can be read
body: <p>This is how I am trying to check if I can read the file before actually reading it </p>
  
  <pre><code>FileStream stream = new FileStream();
  try
  {
     // try to open the file to check if we can access it for read
     stream = File.Open(this.DataSourceFileName, FileMode.Open, FileAccess.Read);
  }
  catch (IOException ex)
  {
     return false;
  }
  finally
  {
     stream.Dispose();
  }
  </code></pre>
  
  <p>Is this the right way?</p>
  
  <p>Also is <code>File.Open</code> similar to <code>File.ReadAllText</code>, what I mean is, are they equally expensive for performance? </p>