افزودن آیتم های یک آرایه به قسمت خاصی از ArrayList با SetRange() در #C
سلام بر تمامی برنامه نویسان سی شارپ 😉 در این مطلب ، افزودن آیتم های یک آرایه به قسمت خاصی از ArrayList با SetRange() در سی شارپ #C رو براتون آماده کردم. انشاالله که این کد براتون مفید باشه.
خروجی پروژه به این صورت می باشد:
// افزودن آیتم های آرایه از ایندکس 2 به بعد
myArrayList[0] = A
myArrayList[1] = A
myArrayList[2] = Here's
myArrayList[3] = some
myArrayList[4] = more
myArrayList[5] = text
myArrayList[6] = A
myArrayList[7] = A
myArrayList[8] = A
myArrayList[9] = A
myArrayList[0] = A
myArrayList[1] = A
myArrayList[2] = Here's
myArrayList[3] = some
myArrayList[4] = more
myArrayList[5] = text
myArrayList[6] = A
myArrayList[7] = A
myArrayList[8] = A
myArrayList[9] = A
افزودن آیتم های یک آرایه به قسمت خاصی از ArrayList با SetRange() :
using System;
using System.Collections;
public class MainClass
{
public static void Main()
{
ArrayList myArrayList = new ArrayList();
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
string[] anotherStringArray = {"Here's", "some", "more", "text"};
using System.Collections;
public class MainClass
{
public static void Main()
{
ArrayList myArrayList = new ArrayList();
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
myArrayList.Add("A");
string[] anotherStringArray = {"Here's", "some", "more", "text"};