Recently i have seen one Query about c to c# data type convert.Type concept is a concept of converting one data type to another data type.C#.net supports two types of typecasting.
Implicit Typecasting:It will be done under control of CLR and convert from lower to higher ex:
byte x=10; int i=x; byte-->intExplicit Type Casting:It will be done undercontrol of programmer and convert data type from high to lower
int i=10; byte x=i; int-->byteobs:
long-->Int:-Explicit float-->double:-Implicit Int-->Float:-implicit Float-->Int:-ExplicitC#.Net supports 4 types of methodologies for explicit type casting 1.c++ style of casting 2.Converting 3.Parsing
No comments:
Post a Comment