Last post Jun 07, 2018 06:36 AM by vahid bakkhi
Member
15 Points
13 Posts
Jun 07, 2018 06:25 AM|aspfan62|LINK
Hi all
What is difference between Cast and Convert?could anyone for me what is different exactly
Star
8119 Points
2778 Posts
Jun 07, 2018 06:36 AM|vahid bakkhi|LINK
hi
if I want to describe simply
Type Casting refers to exchanging one type (roughly speaking, an object structure) for another while
Type Conversion refers to translating of values (roughly speaking, contents of the object), so that they may be interpreted as belonging to a new type
please refer to below links:
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/types/casting-and-type-conversions
https://stackoverflow.com/questions/15394032/difference-between-casting-and-using-the-convert-to-method
Member
15 Points
13 Posts
differnce between Cast and Convert
Jun 07, 2018 06:25 AM|aspfan62|LINK
Hi all
What is difference between Cast and Convert?could anyone for me what is different exactly
Star
8119 Points
2778 Posts
Re: differnce between Cast and Convert
Jun 07, 2018 06:36 AM|vahid bakkhi|LINK
hi
if I want to describe simply
Type Casting refers to exchanging one type (roughly speaking, an object structure) for another while
Type Conversion refers to translating of values (roughly speaking, contents of the object), so that they may be interpreted as belonging to a new type
please refer to below links:
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/types/casting-and-type-conversions
https://stackoverflow.com/questions/15394032/difference-between-casting-and-using-the-convert-to-method
Please MARK AS ANSWER if suggestion helps.