- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
The "E" and "e" custom specifiers in C#
If any of the following string appears in the format string and followed by at least one zero, then the number is formatted with an “E” or “e” in between the number and the exponent.
"E" "E+" "E-" "e" "e+" "e-"
Example
using System; using System.Globalization; class Demo { static void Main() { double num = 9400; Console.WriteLine(num.ToString("0.###E+0", CultureInfo.InvariantCulture)); Console.WriteLine(String.Format(CultureInfo.InvariantCulture, "{0:0.###E+0}", num)); Console.WriteLine(num.ToString("0.###E+000", CultureInfo.InvariantCulture)); Console.WriteLine(String.Format(CultureInfo.InvariantCulture, "{0:0.###E+000}", num)); } }
Output
9.4E+3 9.4E+3 9.4E+003 9.4E+003
- Related Articles
- E-Business and E-Commerce
- Consider the ambiguous grammar. E → E + E E → E * E E → (E) E → id (a) Construct LR (0) items for above grammar. (b) Construct SLR parsing table for grammar. (c) Parse the input string id + id * id.
- In the given figure, $DE | AC$ and $DF | AE$.Prove that ( frac{mathbf{B F}}{mathbf{F E}}=frac{mathbf{B E}}{mathbf{E C}} )"
- Difference between B2B e-Commerce and B2C e-Commerce
- What does the method addFirst(E e) do in java?
- What does the method addLast(E e) do in java?
- Format specifiers in C
- C# Exponential (“E”) Format Specifier
- What is the difference between throw e and throw new Exception(e) in catch block in java?
- E-textiles: Meaning and Significance
- If $P (E) = 0.05$, what is the probability of ‘not E’?
- Find FIRST & FOLLOW for the following Grammar E → E + T|T T → T ∗ F|F F → (E)|id
- $F + V - E = 2$ and if $F = 20$, $V = 12$,Then find the value of $E$.
- Registers B, C, D, E, H, and L in 8085 Microprocessor
- What are type specifiers in C++?

Advertisements