Techie Talks

Wednesday, March 23, 2005

Type conversion in C#

To convert one data type to another, the System.Convert class comes handy. It has built in public methods that can be called for type conversion.

For example:

System.Convert.ToInt32(myFloatValue);

converts the float value in myFloatValue into integer. If it cannot covert, exceptions are thrown.

0 Comments:

Post a Comment

<< Home