String to Int
From: Richard Blewett [DevelopMentor] (richardb_at_develop.com)
Date: 09/20/04
- Next message: cashdeskmac: "RE: Files"
- Previous message: John J. Hughes II: "Re: String to Int"
- In reply to: Dan: "String to Int"
- Next in thread: Randy: "Re: String to Int"
- Messages sorted by: [ date ] [ thread ]
To: microsoft.public.dotnet.languages.csharp Date: Mon, 20 Sep 2004 11:59:23 -0700
int.Parse("42");
You have to think about "what would provide the functionality?" to know where to look as there are no global functions. So what would know what an int is meant to look like as a string? An int! :-)
Regards
Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog
nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/ Kind of a newbie question, but I need to be able to convert a string to
an integer in C#, similar to VB's Val(). Anybody know how to do this?
I've tried C-style casting (obviously to no avail).
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date: 17/09/2004
[microsoft.public.dotnet.languages.csharp]
Relevant Pages
... You also have the fairly major stumbling block that string is sealed so you'd have to use encapsulation and delegation instead. ... Regards ... Richard Blewett - DevelopMentor ...
(microsoft.public.dotnet.languages.csharp)
... private string[] GetInitializedStringArray ... Richard Blewett - DevelopMentor ... How do you create a string array and initialize it with * ...
(microsoft.public.dotnet.languages.csharp)
... Regards ... Richard Blewett - DevelopMentor ... When having a string that is defined as a stringbuilder it can be converted ...
(microsoft.public.dotnet.languages.csharp)
... > I know it must sound like a newbie question, but I never really had to ... > array of char that's dynamically allocated. ... Every string container must have a ... for a really correct and useful solution you have to roll your ...
(comp.lang.c)
... Regards ... Richard Blewett - DevelopMentor ... Checked by AVG anti-virus system. ...
(microsoft.public.dotnet.languages.csharp)