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 8641979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:39:54+00:00 2026-06-12T11:39:54+00:00

I have a list of strings which includes strings in format: xx@yy xx =

  • 0

I have a list of strings which includes strings in format: xx@yy

xx = feature name

yy = project name

Basically, I want to split these strings at @ and store the xx part in one string array and the yy part in another to do further operations.

string[] featureNames = all xx here

string[] projectNames = all yy here

I am able to split the strings using the split method (string.split(‘@’)) in a foreach or for loop in C# but I can’t store two parts separately in two different string arrays (not necessarily array but a list would also work as that can be converted to array later on).

The main problem is to determine two parts of a string after split and then appends them to string array separately.

  • 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-12T11:39:55+00:00Added an answer on June 12, 2026 at 11:39 am

    This is one simple approach:

    var xx = new List<string>();
    var yy = new List<string>();
    foreach(var line in listOfStrings)
    {
       var split = string.split('@');
       xx.Add(split[0]);
       yy.Add(split[1]);
    }
    

    The above instantiates a list of xx and and a list of yy, loops through the list of strings and for each one splits it. It then adds the results of the split to the previously instantiated lists.

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

Sidebar

Related Questions

Example of the problem If I have a list of valid option strings which
I have a simple list of strings, which may be of arbitrary length. I'd
I have the following code which utilises Guava's Files.readLines() method: List<String> strings = Lists.newArrayList();
I have a string which is basically a list of words delimited by commas.
I have a ListView which displays a list of string values. I want to
I have a regex which includes a list of commands. But I don't know
I have a list that contain two colums which are type currency. I want
I have a customers List(of String) on which I am trying to find the
Quick question, I have the following string which is a coma separated list of
I have a list which contains some items of type string. List<string> lstOriginal; I

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.