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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:45:48+00:00 2026-06-18T03:45:48+00:00

I am trying to enter multiple values into a textbox and when I press

  • 0

I am trying to enter multiple values into a textbox and when I press a button they will be stored in an array. Like this: 1.1, 2.2, 3.3, 4.4, 5.5 Then press the button and they are stored in index 0, 1, 2, 3, 4

I understand that the values are a string and need to be converted, I think I am close to the answer but I am not sure, here is what I have been trying:

 private void textBox1_TextChanged(object sender, EventArgs e)
    {
        //five values entered from textbox
        string values = textBox1.Text;
        string[] EmailArr = values.Split(',');
        double[] yArray = new double[5] = Array.ConvertAll(values.Split(','), Double.Parse);
    }

I know this is wrong, but is it along the right lines? Any help is appreciated! Thank you!

  • 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-18T03:45:49+00:00Added an answer on June 18, 2026 at 3:45 am

    the linq way :

    var yArray = textBox1.Text
                         .Split(',')
                         .Select(m => Double.Parse(m.Trim()))
                         .ToArray();
    

    By the way, don’t use that with a TextChanged event, rather with a Validated, or a Clicked on your button.

    Edit

    Follow this steps :

    Double click on “YourForm”.cs (to have the “design”).

    Select your TextBox.

    Right click, choose “Properties”.

    See the “Event list”.

    Remove anything on line “TextChanged”

    DoubleClick on line Validated (this will add text on this line)

    This should open the “code” part.

    Past my answer’s code into the new method “private void textBox1_Validated(…)”

    Remove all the code present in your question.

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

Sidebar

Related Questions

I'm trying to enter edit mode on a specific cell like this: void MainWindow::on_addButton_released()
i'm trying to get the portletPreferences enter in my ConfigActionImpl which is like this
I'm trying to enter a 0 into a Textbox hooked into a MaskedEditExtender. My
Im trying to enter certain values to a db table and although its going
I'm trying to capture the ENTER event of a TextInput like so: a_txt.addEventListener(fl.events.ComponentEvent.ENTER, aEnter);
I'm trying to create an application, that takes in multiple values with cookies, however
I am trying to execute multiple sql statements in yii , this is to
i have been trying to write a program to insert the array values in
I have several lists that I'm trying to enter into a data frame: mydates
I am trying to update values entered into cells in Column A . 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.