How do I Extract negative and positive int from a string in C#
<p>The code will display <code>ten</code> when I need it to display the error message</p>

<pre><code>int _userInt = 0;
string _checkForNumbers = "Mitchell, -10";
var _intInput = string.Join("", _checkForNumbers.Where(char.IsDigit));
int.TryParse(_intInput, out _userInt);
if(_userInt &lt; 0)
{
  Console.WriteLine("Please only enter positive numbers");
  Console.ReadKey(true);
}
else
{
  Console.Write($"{_userInt}");
  Console.ReadKey(true);
}
</code></pre>