0
I’m working with C# and I want to know, please, how do I separate the contents of a q file contains the following information:
There are 30 calories in Pumpkin (1 cup).
There are 83 calories in Pumpkin (without Salt, Canned) (1 cup).
There are 67 calories in Mixture of Vegetables (Corn, Green Beans, Peas, Carrots) (without Salt, Canned) (1 cup). "
I want to get the bold text to be passed to a variable.
EX: From line three of the file I want my variables to have the values contained there:
int calorias = 67;
string nomeVegetal = "Mistura de Vegetais (Milho, Feijão Verde, Ervilhas,Cenouras) (sem Sal, Enlatado)";
string quantidade = (1 chávena);
Note: I have read the file and sorted by line, but on each line I am not able to separate in order to get what I want.
You need to get the number (that precedes the word calories) also?
– Jéf Bueno