Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Help me please..

Help me please..

Scheduled Pinned Locked Moved C#
questiondata-structureshelptutoriallearning
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KORCARI
    wrote on last edited by
    #1

    How can I enter in a textbox(for example textbox1) a list of coefficients and convert this list of coefficients from input string to an array of doubles so I can use it to obtain numerator and denominator of a function? Help me please cause I am a beginner.Best regards

    R 1 Reply Last reply
    0
    • K KORCARI

      How can I enter in a textbox(for example textbox1) a list of coefficients and convert this list of coefficients from input string to an array of doubles so I can use it to obtain numerator and denominator of a function? Help me please cause I am a beginner.Best regards

      R Offline
      R Offline
      ricardojb
      wrote on last edited by
      #2

      I don't know how you separate each number, but let's assume it's comma separated values, like 1,3,9,75. The first thing you have to do is separate this values, you can use the Split method of the string class. char[] separator = new char[1]; separator[0] = ','; string[] numbers = textbox1.Text.Split(separator); double[] coeficients = new double[numbers.Lenght]; for (int i = 0; i < numbers.Lenght; i++) { try { coeficients[i] = double.Parse(numbers[i]); } catch { } }

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups