String splitting

Asked

Viewed 43 times

0

Being a string in the following format:

string valores = "valor1#valor2#valor3";

I wish to store the values separated by # in a array, having such a result:

teste[0] = valor1;
teste[1] = valor2;
teste[2] = valor3;

Anyone can help?

Note: I looked for some solutions in this forum but I was not successful.

  • 2

    has used var var teste = valores.Split("#")?

  • friend, if I pass this line more than once I increase the number of positions of my "test" array automatically?

  • explain me to pass more than once, if you put only this line is generated only the values that the Split find, not understood several times.?

  • 1

    worked here friend, I managed to make work this split(). Thank you!!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.