Solved

What is the easiest way to convert a string to a value

Posted on 2008-09-30
3
172 Views
Last Modified: 2012-05-05
If I have a string called zip and I want to convert it to a value, what is the easiest way to do this.

Example

string zip;
zip = "12345"

int x;
x = val(zip)----------------------------something like that????



0
Comment
Question by:kwh3856
  • 2
3 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 22608155
this should do:

string zip;
zip = "12345" 
int x = int.Parse(zip);

Open in new window

0
 

Author Comment

by:kwh3856
ID: 22608158
I need answer in C# syntax.
0
 

Author Closing Comment

by:kwh3856
ID: 31501665
wow!!! that was fast.  Thanks Angel.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now