Friday, April 19, 2024 23:49

Posts Tagged ‘casting’

Conversion to type String

Saturday, January 7th, 2017

The first kind of conversion to type string is the implicit type converting. Whenever you concatenate a string and another type which is not of type string, the .NET runtime will convert the second type to string, on the fly, in behind, without you knowing it.… Read more

Explicit type conversion

Friday, January 6th, 2017

Explicit type conversion basically means “I know what I am doing, so let me covert this into this, because I know it will work”. It is used whenever there is a possibility of data loss. For instance, when converting from ANY real number type into an integer, there is ALWAYS a loss of data, because integers cannot store fractional parts.… Read more

Implicit type conversion

Friday, January 6th, 2017

As we discussed in the last lesson, implicit type conversion (hidden conversion) is only possible when there is no risk of any data loss during the transformation (for instance, when converting a lower range number, like an int, to a higher range number, like a long).… Read more

Casting and type conversion

Friday, January 6th, 2017

Casting and type conversion generally refers to modifying a data type into another data type. In order to perform an operation on two data types, we need to convert both to the same data type. Type conversion if of two kinds: implicit and explicit.Read more


Follow the white rabbit