Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Convert.ToDouble


  • Please log in to reply
4 replies to this topic

#1 Travis B.

Travis B.

    Member

  • Members
  • PipPip
  • 10 posts

Posted 07 November 2011 - 04:15 PM

Hello!

Working with NMF 4.2, VS2010 launches a NotImplementedException when I try to do the next conversion

Convert.ToDouble("0.0");

Doesn't the ToDouble() method work in NMF 4.2?

Thanks!

#2 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 07 November 2011 - 04:18 PM

Hi Travis, Could this perhaps be related with http://netduino.code....com/workitem/2 ? Did it work on 4.1? Can't test it myself right now.
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#3 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 07 November 2011 - 04:56 PM

Travis, avoid using double, unless strictly necessary. The double has an impact much heavier than a simple float (Single). However, that's not involving your particular problem. Cheers
Biggest fault of Netduino? It runs by electricity.

#4 Travis B.

Travis B.

    Member

  • Members
  • PipPip
  • 10 posts

Posted 07 November 2011 - 06:03 PM

Could this perhaps be related with http://netduino.code....com/workitem/2 ?


It seems to be the same problem, but VS launches the same exception after calling the Double.Parse("0.0") method.

Did it work on 4.1?


I don't know, I need to work on NMF 4.2

Travis, avoid using double, unless strictly necessary.


I know that, but how can I convert a string into a single directly? I might convert the string into a double and then convert the double into a single, isn't it?

(Single)Convert.ToDouble("0.0");


#5 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 08 November 2011 - 05:06 AM

I know that, but how can I convert a string into a single directly? I might convert the string into a double and then convert the double into a single, isn't it?

Now I don't remember: is there the float.Parse("123.4f") function?
Biggest fault of Netduino? It runs by electricity.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.