**Maximum:** Each numeric type—Byte, Short, Integer, Long—has a different maximum value. This is the highest value the type can represent.

**Here:** In this program, we display the maximum values for Byte, Short, Integer and Long types.

**Example:** We see the MaxValue of UInteger, ULong and UShort. The maximum of ULong is 20 digits.

**Decimal:** The Decimal type contains 16 bytes, making it four times the size of an Integer.

**Random:** The Random class generates unpredictable integers. We optionally specify a minimum and maximum.

**Tip:** The String Class extensively uses Char values. Each String internally contains Chars.

**Int32:** This method converts a value type into an Int32 type. The Integer in VB.NET is an alias for Int32.

**Miles, kilometers:** We convert units in miles to kilometers, and the opposite. Many numeric conversions can be done in a similar way.

**Tip:** Reusing the Math type leads to clearer code. Implementing mathematical functions is a burden.

Home

Dot Net Perls

© 2007-2020 Sam Allen. Every person is special and unique. Send bug reports to info@dotnetperls.com.