Example
using System; namespace Samples { public class ByteSample { public static void Main() { byte b = Byte.MaxValue; Console.WriteLine("MaxValue is {0}", b); Console.WriteLine("MaxValue.GetHashCode is {0}", b.GetHashCode()); b = Byte.MinValue; Console.WriteLine("MinValue is {0}", b); Console.WriteLine("MinValue.GetHashCode is {0}", b.GetHashCode()); string s = Byte.MaxValue.ToString(); b = Byte.Parse(s); Console.WriteLine(b); } } }
MaxValue is 255 MaxValue.GetHashCode is 255 MinValue is 0 MinValue.GetHashCode is 0 255
Get .NET Framework Standard Library Annotated Reference, Volume 1: Base Class Library and Extended Numerics Library now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.