Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DoubleToString and E notation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    DoubleToString and E notation

    Hello I need to convert a double to string.

    No trouble with normal number

    double x = 1,23;
    string s = x.ToString()

    Result = "1,23"


    But with very small numbers..

    double x = 0.000001;
    string s = x.ToString()

    Result = "1E-06"


    Any solution?

    #2
    I would suggest to review the various String format options C# offers - http://www.ninjatrader.com/support/f...ead.php?t=3823

    You could for example force fixed point formatting and your # of decimals...

    Comment


      #3
      I've resolved with the function in this post: http://www.ninjatrader.com/support/f...2&postcount=10

      Thanks for your reply.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      574 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      333 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X