Class ListExtensions
Extensions for lists
Inherited Members
Namespace: BomberDogs.Extensions
Assembly: Assembly-CSharp.dll
Syntax
public static class ListExtensions
Methods
| Edit this page View SourceTryGet<T>(IReadOnlyList<T>, int)
Try to get value in index otherwise returns null
Declaration
public static T TryGet<T>(this IReadOnlyList<T> list, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<T> | list | Target list |
| int | index | Index of element |
Returns
| Type | Description |
|---|---|
| T | Element |
Type Parameters
| Name | Description |
|---|---|
| T |
TryGet<T>(List<T>, int)
Try to get value in index otherwise returns null
Declaration
public static T TryGet<T>(this List<T> list, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| List<T> | list | Target list |
| int | index | Index of element |
Returns
| Type | Description |
|---|---|
| T | element |
Type Parameters
| Name | Description |
|---|---|
| T |