Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
- .AddCookie(options => //CookieAuthenticationOptions
- {
- options.LoginPath = new Microsoft.AspNetCore.Http.PathString("/Account/Login");
- });
- public static void ForEach(int[] array, Action<int> action)
- {
- for (int i = 0; i < array.Length; ++i)
- action(array[i]);
- }
- static void Method(int x)
- {
- Console.WriteLine("Элемент: " + x);
- }
- int[] myarray = { 1, 3, 5, 7 };
- ForEach(myarray, Method);
- ForEach(myarray, (int x) => { Console.WriteLine("Элемент: " + x); });
- ForEach(myarray, (x) => { Console.WriteLine("Элемент: " + x); });
- ForEach(myarray, x => { Console.WriteLine("Элемент: " + x); });
- ForEach(myarray, x => Console.WriteLine("Элемент: " + x));
Add Comment
Please, Sign In to add comment