Possible Duplicate:
Integer summing blues, short += short problem
I feel dumb that this is happening, but I have never had this happen before. I am trying to do the following:
foreach (short a in answers)
{
if (a != myConstants.NOTCOMPLETE_SHORT)
{
result = result + a;
}
else
{
empty = true;
break;
}
}
answers is an array of shorts. intellisense is telling me that result + a is an int and I can't assign it to a short.
I have to be missing something very fundamental here but not allowing two shorts to be added together and assigned to a short variable just seems weird.