Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CType() in VB.NET
Message
From
11/05/2005 21:57:10
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01013227
Message ID:
01013238
Views:
15
Yep, that's the correct conversion.

~~Bonnie


>Is the following VB.NET code:
>
>Dim MyNumber As Long
>Dim MyNewType As Single
>MyNumber = 1000
>MyNewType = CType(MyNumber,Single)   ' MyNewType is set to 1000.0.
>
>
>the same as te following C# code?
>
>Int64 myNumber;
>Single myNewType;
>myNumber = 1000;
>myNewType = (Single)myNumber;
>
>
>The reason I am asking is because I am trying to find the equivalent of VB.NET's CType() in C#
>
>Thanks,
>Einar
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform