Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created June 25, 2021 19:18
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
string cadena = "Galletas,100,5";
string[] separado = cadena.Split(new char[] { ',' });
string nombre = separado[0];
double precio = Convert.ToDouble(separado[1]);
int existencia = Convert.ToInt32(separado[2]);
Console.WriteLine("El nombre es {0}, el precio es {1} y la existencia es {2}", nombre, precio, existencia);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment