What is E+3? What exactly happens here? Can we use this approach in other data types or can we only use it in floating point numbers?
static void Main(string[] args)
{
double w = 1.7E+3;
Console.WriteLine(w);
}
Output: 1700
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As for your second question:
See the C# spec:
However, you have to cast or suffix the literal appropriately when assigning to anyhting other than a
Double, because any literal with aneorEin it is recognized as aDoublein Visual Studio. I cannot find where this behavior is specified.