C#
In c# we can convert by casting
int y;
Datatype x = (Datatype) y;
Data types:
byte, sbyte, short, ushort, int, uint, long, ulong, float, double, decimal, char, A Unicode character, string, bool, object
Visual Basic has classes for all data type conversions. Here is a list of classes.
CBool - convert to Bool data type
CByte - convert to Byte data type
CChar - convert to Char data type
CDate - convert to Date type
CDbl - convert to Double data type
CDec - convert to Integer data type
CLng - convert to Long data type
CObj - convert to Object type
CShort - convert to Short data type
CSng - convert to Single data type
CString - convert to String data type
Datatype conversion in C# and VB
Here are some classes that are used in data type conversions.


C# CornerPosted Oct 11, 2010, 8:26 AM EDT
Dear Gomathi Types and Type Casting is a long topic in .NET this reference is so great but bring beginners to a hole with exception at runtime thanks