تبدیل ArrayList به آرایه در #C
سلام بر تمامی برنامه نویسان سی شارپ 😉 در این مطلب ، تبدیل ArrayList به آرایه در سی شارپ #C رو براتون آماده کردم. انشاالله که این کد براتون مفید باشه.
خروجی پروژه به این صورت می باشد:
Array 2:
B
G
J
S
M
B
G
J
S
M
تبدیل ArrayList به آرایه :
using System;
using System.Collections;
class MainClass
{
public static void Main(string[] args)
{
// Create a new ArrayList and populate it.
ArrayList list = new ArrayList(5);
list.Add("B");
list.Add("G");
list.Add("J");
list.Add("S");
list.Add("M");
using System.Collections;
class MainClass
{
public static void Main(string[] args)
{
// Create a new ArrayList and populate it.
ArrayList list = new ArrayList(5);
list.Add("B");
list.Add("G");
list.Add("J");
list.Add("S");
list.Add("M");