Okay, I understand that when you are performing an implicit conversion, you are converting a type into another type what can hold the same amount of numbers. So a char into a short would be an implicit conversion.
Explicit conversion is when you are performing a conversion where you are changing a type into another type in which the two cannot hold the same amount of numbers. So an explicit conversion would be changing a short into a byte.
Well now when my book shows this:
doubleResult = floatVal * shortVal;
It says that C# will do an implicit conversion to change the shortVal into a float before assigning it to the doubleResult value. Well, wouldn't that be an explicit conversion changing the shortVal into a float?


Sign In
Create Account


Back to top









