C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » VB.NET Syntax »

Converting strings to numbers in VB.NET


Posted Date: 31 Oct 2008    Resource Type: Code Snippets    Category: VB.NET Syntax
Author: RoshanMember Level: Silver    
Rating: 1 out of 5Points: 10



The following VB.NET sample code shows how to convert strings to numbers.

Here,we use Val to Convert a string to a number and Str is used to convert number into string.

Here's an example that converts a String into a number and then back into String


Module Module1
Sub Main()
Dim strText1 As String="1234"
Dim intValue As Integer

intValue=Val(strText1)
strText1=Str(intValue)

System.Console.WriteLine(strText1)
End Sub
End Module





Responses

Author: Hefin Dsouza    02 Nov 2008Member Level: Diamond   Points : 1
Type Convertions in VB.net is not a Big Deal
Try It in C#.

Nice Efforts
Keep It Up!!

Regrads Hefin Dsouza.


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Strings  .  

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: Handling Strings
Previous Resource: Handling Label Events in VB.NET
Return to Discussion Resource Index
Post New Resource
Category: VB.NET Syntax


Post resources and earn money!
 
Related Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use