try this
public void SomeFunction()
{
List<int> lst = new List<int> ();
lst.AddRange(new int[]{1,2,3,4,-1,-2,-3,-4});
var data = manipulate_data(lst);
}
public List<int> manipulate_data (List<int> lstInput)
{
int positiveCount =0;
int negativeSum = 0;
foreach (var item in lstInput)
{
if (item > 0)
positiveCount++;
else if (item < 0)
{
negativeSum += item;
}
}
List<int> lstOutput = new List<int>();
lstOutput.Add(positiveCount);
lstOutput.Add(negativeSum);
return lstOutput;
}