title: sort a List<int> in c# ignoring the sign
body: <p>I have a list as below
      var initial = new List { 2, 5, 6,-1, -3, -4 };</p>
  
  <p>Expected output is {-1,2,-3,-4,5,6} =>(sort the given list by ignoring the -ve sign but not removing them in the result.)</p>
  
  <p>My attempt to solve this is </p>
  
  <pre><code>            var initial = new List&lt;string&gt; { 2, 5, 6,-1, -3, -4 };
              var dummyList = initial.FindAll(x =&gt; x &lt; 0);
  
              initial .RemoveAll(x =&gt; dummyList.Contains(x));
  
              foreach (var e in dummyList)
              {
                  initial .Add(e * -1);
              }
  
              initial.Sort();
  
              foreach (var e in dummyList)
              {
                  var index = initial.FindIndex(x=&gt;x==(e*-1));
                  initial.RemoveAt(index);
                  initial.Insert(index, e);
              }
  </code></pre>
  
  <p>Can someone give a better solution for this.
  <a href="https://dotnetfiddle.net/gcd1I1" rel="nofollow">https://dotnetfiddle.net/gcd1I1</a>
  Thanks!</p>