|
| 1 | +#### [KeepCoding](index.md 'index') |
| 2 | +### [KeepCoding](KeepCoding.md 'KeepCoding').[Helper](Helper.md 'KeepCoding.Helper') |
| 3 | +## Helper.ToNumbers<T>(IList<T>, Nullable<int>, Nullable<int>, Nullable<int>, Nullable<int>) Method |
| 4 | +Parses each element of an array into a number. If it succeeds it returns the integer array, if it fails then it returns null. |
| 5 | +```csharp |
| 6 | +public static int[] ToNumbers<T>(this System.Collections.Generic.IList<T> ts, System.Nullable<int> min=null, System.Nullable<int> max=null, System.Nullable<int> minLength=null, System.Nullable<int> maxLength=null) |
| 7 | + where T : notnull; |
| 8 | +``` |
| 9 | +#### Type parameters |
| 10 | +<a name='KeepCoding.Helper.ToNumbers.T.(System.Collections.Generic.IList.T..System.Nullable.int..System.Nullable.int..System.Nullable.int..System.Nullable.int.).T'></a> |
| 11 | +`T` |
| 12 | + |
| 13 | +#### Parameters |
| 14 | +<a name='KeepCoding.Helper.ToNumbers.T.(System.Collections.Generic.IList.T..System.Nullable.int..System.Nullable.int..System.Nullable.int..System.Nullable.int.).ts'></a> |
| 15 | +`ts` [System.Collections.Generic.IList<](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1')[T](Helper.ToNumbers.jKlH6SB0aEghU6jHZQyJ6g.md#KeepCoding.Helper.ToNumbers.T.(System.Collections.Generic.IList.T..System.Nullable.int..System.Nullable.int..System.Nullable.int..System.Nullable.int.).T 'KeepCoding.Helper.ToNumbers<T>(System.Collections.Generic.IList<T>, System.Nullable<int>, System.Nullable<int>, System.Nullable<int>, System.Nullable<int>).T')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IList-1 'System.Collections.Generic.IList`1') |
| 16 | +The array to convert to an integer. |
| 17 | + |
| 18 | +<a name='KeepCoding.Helper.ToNumbers.T.(System.Collections.Generic.IList.T..System.Nullable.int..System.Nullable.int..System.Nullable.int..System.Nullable.int.).min'></a> |
| 19 | +`min` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') |
| 20 | +The minimum acceptable value of any given index. (inclusive) |
| 21 | + |
| 22 | +<a name='KeepCoding.Helper.ToNumbers.T.(System.Collections.Generic.IList.T..System.Nullable.int..System.Nullable.int..System.Nullable.int..System.Nullable.int.).max'></a> |
| 23 | +`max` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') |
| 24 | +The maximum acceptable value of any given index. (inclusive) |
| 25 | + |
| 26 | +<a name='KeepCoding.Helper.ToNumbers.T.(System.Collections.Generic.IList.T..System.Nullable.int..System.Nullable.int..System.Nullable.int..System.Nullable.int.).minLength'></a> |
| 27 | +`minLength` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') |
| 28 | +The minimum acceptable length of the array. (inclusive) |
| 29 | + |
| 30 | +<a name='KeepCoding.Helper.ToNumbers.T.(System.Collections.Generic.IList.T..System.Nullable.int..System.Nullable.int..System.Nullable.int..System.Nullable.int.).maxLength'></a> |
| 31 | +`maxLength` [System.Nullable<](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1')[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32')[>](https://docs.microsoft.com/en-us/dotnet/api/System.Nullable-1 'System.Nullable`1') |
| 32 | +The maximum acceptable length of the array. (inclusive) |
| 33 | + |
| 34 | +#### Returns |
| 35 | +[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array') |
| 36 | +The array as integers, or null if it fails. |
0 commit comments