欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
Linq操作ArrayList

ArrayList實(shí)現了System.Collections空間下的IEnumerable接口,這個(gè)接口是非泛型的。如果要使用LINQ,必須聲明枚舉變量的類(lèi)型,依賴(lài)Cast查詢(xún)運算符轉換枚舉類(lèi)型。

using System;using System.Collections;using System.Collections.Generic;using System.Data;using System.IO;using System.Linq;namespace ConsoleApp4{    class Program    {        static void Main(string[] args)        {            var arrayList = GetArrayList();            //查詢(xún)表達式            var query = from Student student in arrayList                        where student.Scores[0] > 95                        select student;            //方法調用            var query2 = arrayList.Cast<Student>().Where(x => x.Scores[0] > 95);        }        static ArrayList GetArrayList()        {            ArrayList arrList = new ArrayList { new Student                {                    FirstName = "Svetlana",                    LastName = "Omelchenko",                    Scores = new int[] { 98, 92, 81, 60 }                }, new Student                {                    FirstName = "Claire",                    LastName = "O’Donnell",                    Scores = new int[] { 75, 84, 91, 39 }                }, new Student                {                    FirstName = "Claire",                    LastName = "O’Donnell",                    Scores = new int[] { 75, 84, 91, 39 }                },new Student                {                    FirstName = "Cesar",                    LastName = "Garcia",                    Scores = new int[] { 97, 89, 85, 82 }                }};            return arrList;        }    }    public class Student    {        public string FirstName { get; set; }        public string LastName { get; set; }        public int[] Scores { get; set; }    }}

 

 

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
c# – 過(guò)濾條件使用LINQ進(jìn)行搜索
30分鐘掌握 C#6
詳解在A(yíng)SP.NET中用LINQ實(shí)現數據處理
linq to sql簡(jiǎn)單使用
JS中的JSON對象
用ADO添加數據到數據庫中
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久