So I've been trying like crazy to add a new line to my String.Join
printout but it seems it's not possible or Am i doing something wrong ? I've both tried using "/n/r"
and Enivrorment.NewLine
as well as a making a class too create a new line
list box I'm trying to print out too
ListBox1.Items.Add("Calories to lose 0.5kg per week: " +
string.Join(Environment.NewLine + "Calories to lose 1kg per week:",
bc.LoseOrGainWeightCalories(bc.MaintainWightCalories(), true)));
calling on this class:
public string[] LoseOrGainWeightCalories(double weight, bool lose) {
string[] array = new string[2];
double LoseGainWeight = this.weight;
if(lose==true) {
array[0] = Convert.ToString(LoseGainWeight - 500);
array[1] = Convert.ToString(LoseGainWeight - 1000);
} else {
array[0] = Convert.ToString(LoseGainWeight + 500);
array[1] = Convert.ToString(LoseGainWeight + 1000);
}
return array;
}
Picture of current output: