I have to write function in C# which will surround every word with double quotes. I want it to look like this:
"Its" "Suposed" "To" "Be" "Like" "This"
Run Code Online (Sandbox Code Playgroud)
Here is the code I've come up with so far, but its not working:
protected void btnSend_Click(object sender, EventArgs e)
{
string[] words = txtText.Text.Split(' ');
foreach (string word in words)
{
string test = word.Replace(word, '"' + word + '"');
}
lblText.Text = words.ToString();
}
Run Code Online (Sandbox Code Playgroud)