title: TryParse String to Int Active Patterns
body: <p>Hello SO I am currently trying to parse a string to an Int using active Patterns and the Int.TryParse Method. Using the old examples from 2012 it used to work something like this:</p>
  
  <pre><code>let (|Int|_|) str =
      match System.Int32.TryParse str with
      | true,int -&gt; Some int
      | _ -&gt; None
  </code></pre>
  
  <p>but now I'm getting an error telling me that the right overload of TryParse() can not be choosen. Annotating the str as a string the error persists. I hope any one of you could help me with this simple problem, thanks in advance.</p>
  
  <p>Some additional Information: I am trying this using FSharp.Core 4.5.2 and .Net Core 2.1.</p>
  
  <p>The Error: </p>
  
  <blockquote>
    <p>FS0041    A unique overload for method 'TryParse' could not be determined
    based on type information prior to this program point. A type
    annotation may be needed. Candidates: Int32.TryParse(s:
    ReadOnlySpan&lt;char>, result: byref&lt;int>) : bool, Int32.TryParse(s:
    string, result: byref&lt;int>) : bool</p>
  </blockquote>