C# Programming
08-31-2009, 06:16 AM
I have this bit of code:
short s1 = 10;
short s2 = 5;
short s3 = s1 - s2;
Error says: Error Cannot implicitly convert type 'int' to 'short'. An explicit conversion exists (are you missing a cast?)
Aren't shorts just 16 bit integers? You can't subtract two of them?
*****************
"We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
modified on Sunday, August 30, 2009 9:45 PM
short s1 = 10;
short s2 = 5;
short s3 = s1 - s2;
Error says: Error Cannot implicitly convert type 'int' to 'short'. An explicit conversion exists (are you missing a cast?)
Aren't shorts just 16 bit integers? You can't subtract two of them?
*****************
"We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
modified on Sunday, August 30, 2009 9:45 PM