Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/12/2014, 11:46
diego79
 
Fecha de Ingreso: noviembre-2014
Mensajes: 8
Antigüedad: 9 años, 6 meses
Puntos: 0
Respuesta: extraer numeros de textbox

aca va mi codigo, pero me extrae los tres numeros juntos asi

-30.6778 0.0000 20.4556
30.6778 0.0000 21.4556

y necesito asignarle una variable a cada trozo de numeros, cosa que no se como hacer

Cita:
string[] partes = textBox4.Text.Split('v');
decimal[] numeros = new decimal[partes.Length - 1];
string v = Convert.ToString(partes[1]);

string x=Convert.ToString(partes[2]);
string y=Convert.ToString(partes[3]);
string z=Convert.ToString(partes[4]);
string v1 = Convert.ToString(partes[5]);
string x1 = Convert.ToString(partes[6]);
string y1 = Convert.ToString(partes[7]);
string z1 = Convert.ToString(partes[8]);




listBox1.Items.Add(v);
listBox1.Items.Add(x);
listBox1.Items.Add(y);
listBox1.Items.Add(z);
listBox1.Items.Add(v1);
listBox1.Items.Add(x1);
listBox1.Items.Add(y1);
listBox1.Items.Add(z1);