C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Type Conversion Functions


Posted Date: 29 Jul 2008    Resource Type: Articles    Category: .NET Framework

Posted By: kingfisher       Member Level: Silver
Rating:     Points: 3



The function name determines the data type of the value it returns, as shown in the following table.

Function name Return data type Range for expression argument
1)CBool
Boolean Data Type
Any valid Char or String or numeric expression.

2)CByte
Byte Data Type
0 through 255 (unsigned); fractional parts are rounded.

3)CChar
Char Data Type
Any valid Char or String expression; only first character of a String is converted; value can be 0 through 65535 (unsigned).

4)CDate
Date Data Type
Any valid representation of a date and time.

5)CDbl
Double Data Type
-1.79769313486231570E+308 through -4.94065645841246544E-324 for negative values; 4.94065645841246544E-324 through 1.79769313486231570E+308 for positive values.

6)CDec
Decimal Data Type
+/-79,228,162,514,264,337,593,543,950,335 for zero-scaled numbers, that is, numbers with no decimal places. For numbers with 28 decimal places, the range is +/-7.9228162514264337593543950335. The smallest possible non-zero number is 0.0000000000000000000000000001 (+/-1E-28).

7)CInt
Integer Data Type
-2,147,483,648 through 2,147,483,647; fractional parts are rounded.

8)CLng
Long Data Type
-9,223,372,036,854,775,808 through 9,223,372,036,854,775,807; fractional parts are rounded.

9)CObj
Object Data Type
Any valid expression.

10)CSByte
SByte Data Type
-128 through 127; fractional parts are rounded.

11)CShort
Short Data Type (Visual Basic)
-32,768 through 32,767; fractional parts are rounded.

12)CSng
Single Data Type
-3.402823E+38 through -1.401298E-45 for negative values; 1.401298E-45 through 3.402823E+38 for positive values.

13)CStr
String Data Type
Returns for CStr depend on the expression argument. See Return Values for the CStr Function.

14)CUInt
UInteger Data Type
0 through 4,294,967,295 (unsigned); fractional parts are rounded.

15)CULng
ULong Data Type
0 through 18,446,744,073,709,551,615 (unsigned); fractional parts are rounded.

16)CUShort
UShort Data Type
0 through 65,535 (unsigned); fractional parts are rounded.





Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Type Conversion Functions  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: What is LINQ - Part 1
Previous Resource: Delegates - Introduction
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

SPOC

Contact Us    Privacy Policy    Terms Of Use