title: how to verify if an input read from console is a file name or a file full path
body: <p>I have a console application in C# and I would like to load an xml file, the path to the file is provided via console.readline(). But, I would like to load the file from the provided path but if the user only provides the name of the file I would like to search for it in the local folder from where the application is running. How can I know when I get only a file name as an input or a file full path. 
  I managed that using:  <code>var isFileNameOnly = ((xmlFilePath.IndexOf("\\")) == -1);</code></p>
  
  <p>But this ugly and probably very buggy. </p>
  
  <p>Full code: </p>
  
  <pre><code>        var xmlFilePath = Console.ReadLine();
          var xmlFile = new XmlDocument();
  
          var isFileNameOnly = ((xmlFilePath.IndexOf("\\")) == -1);
          try
          {
              if (isFileNameOnly)
              {
                  xmlFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, xmlFilePath);
              }
  
              xmlFile.Load(xmlFilePath);
  
          }
  </code></pre>
  
  <p>Thx</p>