Table of Contents

Class LongExtensions

Namespace
WhatIsHeDoing.Core.Extensions
Assembly
WhatIsHeDoing.Core.dll

Provides extension methods for the long value type.

public static class LongExtensions
Inheritance
LongExtensions
Inherited Members

Methods

Length(long)

Determines the length of a positive number.

public static long Length(this long value)

Parameters

value long

To test

Returns

long

Length

Exceptions

ArgumentOutOfRangeException

Thrown for the minimum value

StripDigits(long, int)

Strips a specified number of digits from a number. If the number of digits to strip exceeds the length of the number, will return zero.

public static long StripDigits(this long value, int numberToStrip)

Parameters

value long

To strip

numberToStrip int

Number of digits to remove

Returns

long

Number

Examples

123.StripDigits(2) == 1