John
What are the type conversions in C#?
By John in C# on May 07 2012
  • Shraban
    Feb, 2016 4

    Type conversion is converting one type of data to another type. It is also known as Type Casting. In C#, type casting has following forms:Implicit type conversion - These conversions are performed by C# in a type-safe manner. For example, are conversions from smaller to larger integral types and conversions from derived classes to base classes.Explicit type conversion - These conversions are done explicitly by users using the pre-defined functions. Explicit conversions require a cast operator.User-defined conversion- User-defined conversion is performed by using special methods that you can define to enable explicit and implicit conversions. It includes conversion of class to struct or basic data type and struct to class or basic data type. Also, all conversions methods must be declared as static.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS