Michael,
In all of the methods that you have mentioned, the string was not cast
to the type that you wanted. Rather, those are functions that perform a
conversion.
These functions exist in .NET as well. They are static methods on the
Convert class, such as ToInt32, ToInt64, etc, etc.
They are available to all languages in .NET as well, since they are part
of the framework.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
(E-Mail Removed)
"Michael D. Ober" <obermd.@.alum.mit.edu.nospam> wrote in message
news:nlWvg.2557$(E-Mail Removed)...
>I am attempting to learn C# and have run into a fundamental type casting
> problem for input strings. After reviewing the VS 2005 documentation, I
> am
> obviously missing simple type conversion operators - specifically, string
> (textbox input values) to numbers of various types. In C++ this would be
> done with sscanf and in both VB6 and VB 2005 this would be done with
> either
> C<type> (CDbl, CLng, etc.) or with the generic VB 2005
> CType(textbox1.text,
> Long).
>
> My question is two fold - first what are the direct equivalents to the
> CDbl
> and CLng series of VB functions and secondly, what is the general type
> caster replacement for CType?
>
> Thanks,
> Mike Ober.
>
>
>