using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace ForEachTester { public partial class ForEachForm : Form { public ForEachForm() { InitializeComponent(); } string sentence = ""; string SingleWordHolder = ""; private void Submitbutton_Click(object sender, EventArgs e) { sentence = InputtextBox.Text; foreach (string word in sentence.Split()) { SingleWordHolder = word; //supposed to append text and output each word on //on a seperate line in the output multiline text box. OutputtextBox.Text = ("abo" + SingleWordHolder + "nvo"); } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)