نمایش تعداد عناصر ArrayList در #C
سلام بر تمامی برنامه نویسان سی شارپ 😉 در این مطلب ، نمایش تعداد عناصر ArrayList در سی شارپ #C رو براتون آماده کردم. انشاالله که این کد براتون مفید باشه.
خروجی پروژه به این صورت می باشد:
Initial number of elements: 0
Adding 6 elements
Number of elements: 6
Adding 6 elements
Number of elements: 6
نمایش تعداد عناصر ArrayList :
using System;
using System.Collections;
class MainClass {
public static void Main() {
ArrayList al = new ArrayList();
Console.WriteLine("Initial number of elements: " + al.Count);
Console.WriteLine("Adding 6 elements");
using System.Collections;
class MainClass {
public static void Main() {
ArrayList al = new ArrayList();
Console.WriteLine("Initial number of elements: " + al.Count);
Console.WriteLine("Adding 6 elements");