Convert C++ code to C#

ltswimmer
ltswimmer used Ask the Experts™
on
Need help to convert below C++ code to C#. Thanks for the help.

In C++:
double dValue = 14 / 1000;
ostringstream oss;
oss.precision(10);
oss<<fixed<<dValue;
string sValue = oss.str();
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Like this:
using System;

namespace EE_Q29158310
{
    class Program
    {
        static void Main(string[] args)
        {
            double dValue = 14f / 1000;
            string sValue = dValue.ToString("F10");
            Console.WriteLine(sValue);
            Console.ReadLine();
        }
    }
}

Open in new window

Which results in the following output -Capture.PNG-saige-

Author

Commented:
This is exactly what I want. I appreciate your help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial