var array = new List<int>();
foreach (var item in myListBox.Items)
{
array.Add(int.Parse(item.ToString()));
}
var sum = array.Sum(x => Math.Pow(x, 2));
myTextBox.Text = sum.ToString();
var array = new[] {6, 8, 12};
var sum = array.Sum(x => Math.Pow(x, 2));