正在加载图片...
System Array和 System Co| lections. ArrayList的使用举例 WriteLine( Additional manipulation of ArrayList malArrayList. RemoveAt(O) ((Animal)animalArrayList [o]). FeedO animalArrayList. AddRange (animalArray ((Chicken) animalArrayList [2]). LayEggo) Console. WriteLine($"The animal called my Cowl. Name] is at index fanimalArrayList. IndexOf(myCow1)]. " myCowl. Name ="Mary WriteLine("The animal is now called [((Animal)animalArrayList [1]). Name]. " ReadEy 注: Arraylist集合类可以用 AddRange o方法和 nsertRange0方法一次 添加好多项,参数可以是带有 Collect ion接口的任意对象,包括数组 这两个方法是专用于 Arraylist类的,不是任何接口的一部分。System.Array和System.Collections.ArrayList的使用举例 注:ArrayList集合类可以用AddRange()方法和InsertRange()方法一次 添加好多项,参数可以是带有Icollection接口的任意对象,包括数组。 这两个方法是专用于ArrayList类的,不是任何接口的一部分
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有