Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace ClassWork
- {
- internal class Program
- {
- public static void Main(string[] args)
- {
- var numbs = new[]{ 1, 2, 3, 4 };
- var numbsFinal = Function(numbs, 3);
- foreach (var numb in numbsFinal) Console.WriteLine(numb);
- }
- public static T[] Function<T>(T[] values, int k)
- {
- return values
- .Skip(k)
- .Concat(values.Take(k))
- .ToArray();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement