March 2004
Intermediate to advanced
560 pages
26h 47m
English
using System; namespace Samples { public class UInt16Sample { public static void Main() { ushort max = ushort.MaxValue, min = ushort.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, UInt16.Parse(s)); s = min.ToString(); Console.WriteLine("\"{0}\" parsed from string yields: {1}", s, UInt16.Parse(s)); string[] formats = ...Read now
Unlock full access