March 2004
Intermediate to advanced
560 pages
26h 47m
English
using System; namespace Samples { public class DecimalSample { public static void Main() { Decimal max = Decimal.MaxValue, min = Decimal.MinValue; Console.WriteLine("MaxValue: {0}", max); Console.WriteLine("MinValue: {0}", min); Console.WriteLine("Is {0} equal to {1}: {2}", max, max, max.Equals(max)); Console.WriteLine("Is {0} equal to {1}: {2}", max, min, max.Equals(min)); Console.WriteLine("{0} has hashcode of: {1}", max, max.GetHashCode()); Console.WriteLine("{0} has hashcode of: {1}", min, min.GetHashCode()); string s = max.ToString(); Console.WriteLine("\"{0}\" parsed from string yields: {1}", s, Decimal.Parse(s)); s = min.ToString(); Console.WriteLine("\"{0}\" parsed from string yields: {1}", s, Decimal.Parse(s)); string[] formats ...Read now
Unlock full access