Connexion
France (Français)
Brasil (Português)
Česká republika (Čeština)
Deutschland (Deutsch)
España (Español)
Italia (Italiano)
United States (English)
Россия (Русский)
대한민국 (한국어)
中华人民共和国 (中文)
台灣 (中文)
日本 (日本語)
香港特别行政區 (中文)
Accueil
Library
Formation
Téléchargements
Support technique
Communautés
Forums
Le réseau pour les développeurs
>
Forums - Accueil
>
Visual C# General
>
cannot convert from object to string
Poser une question
Rechercher dans les forums :
Rechercher dans le forum Visual C# General
Rechercher dans tous les forums MSDN
cannot convert from object to string
mercredi 4 novembre 2009 19:51
hazz
0
Connectez-vous pour voter
Convert Picture
illustrates the problem. buildpacket() is being called from two places with same errors.
Thank you for helping !
Greg
Moderator: Just use the link button on the editor to paste the actual link...no need to use tinyurl.
Modifié
OmegaMan
MVP
, Modérateur
mercredi 4 novembre 2009 20:31
Changed Link away from tinyurl
Réponse
Citation
Réponses
mercredi 4 novembre 2009 20:25
Balaji Baskar
0
Connectez-vous pour voter
Use either this:
serialPort1.Write(Convert.ToString(buildpacket(ref useraddress, 252, "0006", "")));
or
serialPort1.Write(buildpacket(ref useraddress, 252, "0006", "")ToString());
Balaji Baskar [Please mark the post as answer if it answers your question]
Marqué comme réponse
hazz
mercredi 4 novembre 2009 20:30
Réponse
Citation
Toutes les réponses
mercredi 4 novembre 2009 20:25
Balaji Baskar
0
Connectez-vous pour voter
Use either this:
serialPort1.Write(Convert.ToString(buildpacket(ref useraddress, 252, "0006", "")));
or
serialPort1.Write(buildpacket(ref useraddress, 252, "0006", "")ToString());
Balaji Baskar [Please mark the post as answer if it answers your question]
Marqué comme réponse
hazz
mercredi 4 novembre 2009 20:30
Réponse
Citation
mercredi 4 novembre 2009 20:31
hazz
0
Connectez-vous pour voter
Thank you very much Balaji .
I just learned something about SerialPort.Write().
Greg
Réponse
Citation
Besoin d'aide sur les forums ? (Forum aux questions)
© 2009 Microsoft Corporation. Tous droits réservés.
Gérer votre profil
|
Contactez-nous
|
Newsletter MSDN
|
Conditions d'utilisation
|
Marques
|
Confidentialité