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

  • Home
  • SEARCH
  • 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 8557679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:37:43+00:00 2026-06-11T15:37:43+00:00

foreach (set.row officeJoin in officeJoinMeta) { foreach (set.somethingRow confRow in myData.something.Rows) { string dep

  • 0
foreach (set.row officeJoin in officeJoinMeta)
{
    foreach (set.somethingRow confRow in myData.something.Rows)
    {
        string dep = confRow["columnName"].ToString();
        depts.Add(dep);
    }
}

I’ve got this for-loop going through a column, adding each value in a column to dep, and later storing all these in a List < String > depts which i defined at the top of this method.

Some of the values in the dep are single strings like “R” but some are need to be separated after the comma “R,GL,BD”.

I understand using .Split(“,”), but how do i split strings–how do i get each value in the array, split them with the comma, then store them in another array?

  • 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-11T15:37:45+00:00Added an answer on June 11, 2026 at 3:37 pm

    Written based on what you’ve explained:

            foreach (set.row officeJoin in officeJoinMeta)
            {
                foreach (set.somethingRow confRow in myData.something.Rows)
                {
                    string dep = confRow["columnName"].ToString();
                    depts.AddRange(dep.Split(','));
                }
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example, doing something like this: foreach (DataRow row in data.Rows) { Person newPerson
The below code is not working <c:forEach var=row varStatus=rowCount begin=1 end=10> <c:set var=entry scope=request
I have this code foreach (DataRow row in dt.Rows) { Debug.WriteLine(Start of Row); for
Say i am having set of rows in a table and each row is
I would like to fetch the result set from a function for each row
I'd like to send an email for each row of a result set using
CREATE TRIGGER google_inventory BEFORE UPDATE ON `cataloginventory_stock_item` FOR EACH ROW BEGIN update `catalog_product_entity_int` set
foreach (int i in a.set) { foreach (int k in b.set) { if (i
I have a method with a nested foreach collection (iterate a set of objects
How do I call a data set from a dictionary inside of a foreach

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.