SyntaxFix
Write A Post
Hire A Developer
Questions
Adding two Int16 values result in an Int32 value. You will have to cast it to Int16:
Int16
Int32
Int16 answer = (Int16) (firstNo + secondNo);
You can avoid this problem by switching all your numbers to Int32.