Remove empty space from number string?
<p>I'm trying to remove any white space in the number from the textbox (txtAllNum) before converting them into an array. But I got the <code>Input string was not in a correct format.</code> error at the attempt to convert them to array.</p>

<p>Please advice.</p>

<p>(The list of numbers which will be inserted already have spaces at the beginning so I can't reject them with validation)</p>

<pre><code>string allNumStr = txtAllNum.Text;
allNumStr = allNumStr.Replace(" ", "");

var intAry = allNumStr
   .Split(new string[] { Environment.NewLine }, 
          StringSplitOptions.RemoveEmptyEntries)
   .Select(s =&gt; Int64.Parse(s));
</code></pre>

<p>Here is the sample input data (They have a spaces at the beginning)</p>

<blockquote>
  <p> 95949323114<br>
   9592099619<br>
   9595173327<br>
   95943054737<br>
   95943090230<br>
   95991046911<br>
   9595028775<br>
   95943173776<br>
   95973494329<br>
   95973082074<br>
   95973000239  </p>
</blockquote>
