title: How to remove only last empty element from array after spliting in c#
body: <p>I have an array which I split on basis of <em>comma</em> <code>","</code> but there is a last entry as empty because I am concatenating it in jquery. I used </p>
  
  <pre><code>Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
  </code></pre>
  
  <p>but it removes <em>all the empty entries</em> from an array e.g. 
  if my array is </p>
  
  <pre><code> "1"," ","2","3"," " 
  </code></pre>
  
  <p>it returns <code>1,2,3</code>. But I want it to remove only the <em>last one</em> from it e.g.
  return <code>1," ",2,3</code>. Is it possible to do it <em>without substracting</em> <code>1</code> from the array? </p>