given VB's tendency to hide errors, the Val() call would return a zero if
the string couldn't be parsed.
Therefore, the equivalent would more likely be:
string a = "233";
string b = "abc";
double conv_a, conv_b;
double.TryParse(a,NumberStyles.Integer,
CultureInfo.CurrentCulture.NumberFormat, conv_a);
double.TryParse(b,NumberStyles.Integer,
CultureInfo.CurrentCulture.NumberFormat, conv_b);
double c = conv_a + conv_b;
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Fabien Bezagu" <fbezagu_at_novacor_dot_fr> wrote in message
news:%(E-Mail Removed)...
> This could be :
>
> double c = double.Parse(a) + double.Parse(b)
>
> Fabien
>
> "jose g. de jesus jr mcp, mcdba"
> <(E-Mail Removed)> a écrit dans le message
> de news: F2EE4208-601C-4A00-A42F-(E-Mail Removed)...
>> vb.net val function
>>
>> c=val(a$)+val(b$)
>>
>> thanks
>
>