|
C# Type ConversionIn C#, everything is regarded as an object. As a consequence, the primitive types can be used where objects are expected without any type conversion, and it is possible to call object methods on them directly. For example the following code will compile in C#:
This is in contrast to Java, where the basic types have no object-like behavior and need to be explicitly converted to and from object wrappers. Of course, the output from the code above is not likely to be rendered
in a culturally correct way. Here is where the Click on a function for more information:TypeConverter.ConvertFromString () TypeConverter.ConvertToString ()
|