CSharp examples for Language Basics:decimal
Use scientific decimal literal
using System;//from ww w . j a va 2 s .co m // Calculates the mass of 100 electrons; class Constants { public const decimal MassOfElectron = 9.0E-28m; } class MassCalculator { public static void Main() { decimal totalMass; totalMass = 100 * Constants.MassOfElectron; Console.WriteLine(totalMass); } }