Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created June 25, 2021 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/36dd71620ead4e48913b7a0df54b07e5 to your computer and use it in GitHub Desktop.
Save parzibyte/36dd71620ead4e48913b7a0df54b07e5 to your computer and use it in GitHub Desktop.
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