The ideal here is to responded to the text box "TextChanged" event with a loop though the text backwards saving it to a new string that I displayed in the output text box.
private void reverseInput_tb_TextChanged(object sender, TextChangedEventArgs e)
{
if (reverseInput_tb.Text != string.Empty)
{
string inputText = reverseInput_tb.Text;
string outputText = string.Empty;
string letter = string.Empty;
for (int i = inputText.Length - 1; i >=0; i--)
{
letter = inputText.Substring(i, 1);
outputText += letter;
}
reverseOutput_tb.Text = outputText;
}
}
0 Comments On This Entry
Trackbacks for this entry [ Trackback URL ]
Tags
My Blog Links
Recent Entries
Search My Blog
0 user(s) viewing
0 Guests
0 member(s)
0 anonymous member(s)
0 member(s)
0 anonymous member(s)
Categories
|
|



Leave Comment










|