Skip to content

Commit 8a43599

Browse files
Update net472_polyFill.cs
1 parent e82e1bc commit 8a43599

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

DeftSharp.Windows.Input/net472_polyFill.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ public static bool TryRemove<TK, TValue>(this ConcurrentDictionary<TK, TValue> d
5454
/// </summary>
5555
public static partial class PolyFillExtensions
5656
{
57+
58+
59+
/// <summary>
60+
/// net472_polyFill - internal --- Ex: collection.TakeLast(5);
61+
/// </summary>
62+
internal static IEnumerable<T> TakeLast_internal_viaSO<T>(this IEnumerable<T> source, int N)
63+
{
64+
return source.Skip(Math.Max(0, source.Count() - N));
65+
}
66+
5767
/// <summary>
5868
/// net472_polyFill - internal
5969
/// </summary>

0 commit comments

Comments
 (0)