I've got 3 variables all declared as type 'Int16', yet this code is refusing to work.
private Int16 _cap; // Seat Capacity
private Int16 _used; // Seats Filled
private Int16 _avail; // Seats Available
public Int16 SeatsTotal {
get {
return _cap;
}
set {
_cap = value;
_used = _cap - _avail;
}
}
Except the part where I have _used = _cap - _avail;
is throwing this error, Error
1 Cannot implicitly convert type 'int' to 'short'. An explicit conversion exists (are you missing a cast?)