title: place the "out type " declaration while calling the method
body: <p>I am trying to use the 'out parameter' within a .NET 4.5.2 application, but I am getting a compile error. </p>
  
  <p>Questions:
  In which framework can I compile this? 
  What does this called? Inline variable declaration in out method calling? </p>
  
  <p>Could you please provide a reference?</p>
  
  <p>Ref: <a href="https://www.dotnetperls.com/parse" rel="nofollow noreferrer">https://www.dotnetperls.com/parse</a> </p>
  
  <blockquote>
    <p>new out syntax: We can place the "out int" keywords directly inside a
    method call. Older versions of C# do not allow this syntax. But this
    can reduce the line count of a program.</p>
  </blockquote>
  
  <pre><code>static void Main()
  {
      const string value = "345";
      // We can place the "out int" declaration in the method call.
      if (int.TryParse(value, out int result))
      {
          Console.WriteLine(result + 1);
      }
  }
  </code></pre>