12 lines
268 B
C#
12 lines
268 B
C#
|
namespace OrangeGuidanceTomestone.Util;
|
||
|
|
||
|
internal static class IReadOnlyListExt {
|
||
|
internal static T? Get<T>(this IReadOnlyList<T> list, int idx) {
|
||
|
if (idx < 0 || idx >= list.Count) {
|
||
|
return default;
|
||
|
}
|
||
|
|
||
|
return list[idx];
|
||
|
}
|
||
|
}
|