title: What could be the best way to return a message if my method return an array in c# .net
body: <p>I'm developing an application and I'm creating a method that has to read a file, but I'm not sure how to return a message in case that the file doesn't exist because my method return an array</p>
  
  <p>Here is what I have: </p>
  
  <pre><code>MyFile = "C:\\MyFile.txt";
  
  private string[] LoadFile()
  {
      string Lines[];
      if (! File.Exist(MyFile))
           //????? &lt;- return a message here!!
      else
         Lines = File.ReadAllLines(MyFile);
      return Lines;
  }
  </code></pre>
  
  <p>I was thinking to do this, is the best way to do it?</p>
  
  <pre><code>private string[] LoadFile()
  {
      string Lines[];
      if (! File.Exist(MyFile))
      {
         Lines[] = new string[1];
         Lines[0] = "File Not Exist";
      }
      else
         Lines = File.ReadAllLines(MyFile);
      return Lines;
  }
  </code></pre>
  
  <p>Then catch the error message and print it?</p>
  
  <p>What is the best way to that validation?</p>