سلام بر تمامی برنامه نویسان سی شارپ 😉 در این مطلب از وب سایت پروگرم 98 کد استفاده از SkipWhile و TakeWhile با ایندکس در سی شارپ را آماده کردم. انشاالله که این آموزش برای شما مفید باشد.
کد استفاده از SkipWhile و TakeWhile با ایندکس در سی شارپ :
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Linq;
public class MainClass{
public static void Main(){
int[] numbers = { 1, 3, 5, 4};
var query = numbers.TakeWhile(( n, index) => n >= index);
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Linq;
public class MainClass{
public static void Main(){
int[] numbers = { 1, 3, 5, 4};
var query = numbers.TakeWhile(( n, index) => n >= index);