سلام بر تمامی برنامه نویسان #C 😉 در این مطلب کد linq: کوئری زدن روی ArrayList و استفاده از حلقه foreach در c#.net را آماده کردم. انشاالله که این آموزش برای شما مفید باشد.
کد linq: کوئری زدن روی ArrayList در c#.net :
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Linq;
using System.Linq;
using System.Collections;
class Car
{
public string PetName;
public string Color;
public int Speed;
public string Make;
}
class Program
{
static void Main(string[] args)
{
ArrayList myCars = new ArrayList();
myCars.Add(new Car{ PetName = "Henry", Color = "Silver", Speed = 100, Make = "BMW"});
using System.Collections.Generic;
using System.Text;
using System.Xml.Linq;
using System.Linq;
using System.Collections;
class Car
{
public string PetName;
public string Color;
public int Speed;
public string Make;
}
class Program
{
static void Main(string[] args)
{
ArrayList myCars = new ArrayList();
myCars.Add(new Car{ PetName = "Henry", Color = "Silver", Speed = 100, Make = "BMW"});