G
Gecko
I would like to know if there is a way to stop the runtime from implicitly
casting values. For exampel, I would like the following code to crash:
byte someByte = 5;
int someInt = someByte;
I would like the assignment of the variable "someByte" to the variable
"someInt" to crash because there is an implicit conversion from Byte to Int
and I DO NOT want that.
I have reasons why I would like this behavior. Any way this can be done?
Thanks
casting values. For exampel, I would like the following code to crash:
byte someByte = 5;
int someInt = someByte;
I would like the assignment of the variable "someByte" to the variable
"someInt" to crash because there is an implicit conversion from Byte to Int
and I DO NOT want that.
I have reasons why I would like this behavior. Any way this can be done?
Thanks