Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CType() in VB.NET
Message
De
11/05/2005 21:57:10
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01013227
Message ID:
01013238
Vues:
16
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform