ArrayList ক্লাসের Count প্রোপার্টি ArrayList-এ থাকা এলিমেন্টের সংখ্যা গণনা করে।
ArrayList-এ এলিমেন্ট যোগ করা
ArrayList arrList = new ArrayList(); arrList.Add(98); arrList.Add(55); arrList.Add(65); arrList.Add(34);
কাউন্ট বের করা
arrList.Count
সম্পূর্ণ কোড
using System;
using System.Collections;
class Demo {
public static void Main() {
ArrayList arrList = new ArrayList();
arrList.Add(98);
arrList.Add(55);
arrList.Add(65);
arrList.Add(34);
Console.WriteLine("Count = " + arrList.Count);
}
}
আউটপুট
Count = 4