string bar = "123456789";
char[] barArr = sw.ToCharArray();
int c;
for (int i = 0; i < barArr.Length; i++)
{
int sum = barArr[barArr.Length - 3] + barArr[barArr.Length - 1];
}
var sum = (x % 1000)/100 + x % 10;
var sum = (x[x.Length-1] - '0') + (x[x.Length-3] - '0');