Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7716681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:41:40+00:00 2026-06-01T02:41:40+00:00

In my winform application, I have an arraylist containing a dynamic number of string

  • 0

In my winform application, I have an arraylist containing a dynamic number of string arrays. I need to somehow remove each string array from the array list and then use these string arrays as parameters for a function. The number of string arrays in the arraylist can vary as they are created dynamically.

The method declaration:

public void mychartbuilder(string[] Column1, string[] Column2 = null, string[] Column3 = null, string[] Column4 = null)

The following is causing the biggest headache. Since there is a dynamic number of arrays in the list, I can’t determine how to pull them out and then send them into the function as parameters.

foreach (string[] myarray in myArrayList)
    {
        string[] copy1 = new string[rcounter];
    }
mymethods.mychartbuilder(//string array parameters will go here)

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:41:41+00:00Added an answer on June 1, 2026 at 2:41 am
    while(arrayList.Count < 4)
    {
      arrayList.Add(null);
    }
    
    mychartbuilder((string[])arrayList[0], (string[])arrayList[1], (string[])arrayList[2], (string[])arrayList[3]);
    

    Note that you can use List<string[]> rather than an ArrayList to avoid all of the casting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a winform application which has a dynamic number (based on a database
I have the following code in an Winform Application String[] lines = { LAST
I have a winform application to read values from the registrykey.. so i know
I have a WinForm application. On the main form there are a number of
I have a c# winform application (2008) with datagridview bound to data from sqlserver.
Im programming C# WinForm application which have big SQL Server Database. I need to
I have a winform application (.NET 2.0 C#). From this application, I want to
I have a WinForm application where I need to capture a KeyPress and fetch
I have a Winform application built with C# and .Net 2.0. I have a
I have my winform application gathering data using databinding. Everything looks fine except that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.