سلام بر برنامه نویسان عزیز 😉 در این پست آموزش linq: استفاده از All برای تشخیص فرد بودن تمام اعضای آرایه در سی شارپ #C را آماده کردم. انشاالله که این کد براتون مفید باشه.
کد linq: استفاده از All برای تشخیص فرد بودن تمام اعضای آرایه در سی شارپ #C :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class MainClass {
public static void Main() {
int[] numbers = { 1, 11, 3, 19, 41, 65, 19 };
bool onlyOdd = numbers.All(n => n % 2 == 1);
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class MainClass {
public static void Main() {
int[] numbers = { 1, 11, 3, 19, 41, 65, 19 };
bool onlyOdd = numbers.All(n => n % 2 == 1);