K
K Viltersten
I try the following.
sbyte HalvOfFour () {
sbyte b = 4;
return b / 2;
}
Apparently, since 2 is regarded as int, the operation
upgrades my b to and int and after it has been
performed, i stand there with an int, which is wrong
type to return.
What i've done about it was to cast the division to a
string by adding an empty string, then parsing it
using the default parser SByte.parse (string).
It works but it sure looks ugly. Any hints?
sbyte HalvOfFour () {
sbyte b = 4;
return b / 2;
}
Apparently, since 2 is regarded as int, the operation
upgrades my b to and int and after it has been
performed, i stand there with an int, which is wrong
type to return.
What i've done about it was to cast the division to a
string by adding an empty string, then parsing it
using the default parser SByte.parse (string).
It works but it sure looks ugly. Any hints?