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
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

C# CornerPosted Oct 11, 2010, 12:26 PM
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