Class NumberExtensions
The number helper.
Inherited Members
Namespace: Code.Library.Extensions
Assembly: Code.Library.dll
Syntax
public static class NumberExtensions
Methods
| Improve this Doc View SourceGetFirstNDigits(int, int)
Gets the first n digits.
Declaration
public static int GetFirstNDigits(this int number, int n)
Parameters
| Type | Name | Description |
|---|---|---|
| int | number | The number. |
| int | n | The n. |
Returns
| Type | Description |
|---|---|
| int | The int. |
GetNthDigit(int, int)
Gets the nth digit.
Declaration
public static int GetNthDigit(this int number, int n)
Parameters
| Type | Name | Description |
|---|---|---|
| int | number | The number. |
| int | n | The n. |
Returns
| Type | Description |
|---|---|
| int | The int. |