Solved

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

Posted on 2008-09-30
3
178 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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
System.Security 2 27
compare between entities in entity framework 8 73
EF5: Question about Metadata Artifact Processing 4 15
C# LINQ ForEach() question 6 28
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

810 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