Click here to Skip to main content
15,906,106 members
Home / Discussions / C#
   

C#

 
AnswerRe: ActiveFomr.Invoke Pin
thomaxz.tc10-Mar-09 3:37
thomaxz.tc10-Mar-09 3:37 
GeneralRe: ActiveFomr.Invoke Pin
Xmen Real 10-Mar-09 3:58
professional Xmen Real 10-Mar-09 3:58 
GeneralRe: ActiveFomr.Invoke Pin
thomaxz.tc10-Mar-09 4:15
thomaxz.tc10-Mar-09 4:15 
GeneralRe: ActiveFomr.Invoke Pin
Xmen Real 10-Mar-09 4:22
professional Xmen Real 10-Mar-09 4:22 
GeneralRe: ActiveFomr.Invoke [modified] Pin
thomaxz.tc10-Mar-09 4:27
thomaxz.tc10-Mar-09 4:27 
GeneralRe: ActiveFomr.Invoke Pin
thomaxz.tc10-Mar-09 5:00
thomaxz.tc10-Mar-09 5:00 
GeneralRe: ActiveFomr.Invoke Pin
Xmen Real 10-Mar-09 5:31
professional Xmen Real 10-Mar-09 5:31 
QuestionReversing letters in a word Pin
Johnny Jackson10-Mar-09 3:18
Johnny Jackson10-Mar-09 3:18 
OK, well I'm trying to make a program that takes a sentence as an input and reverses the letters in each word while keeping the order of the words the same i.e. "Hello World" becomes "olleH dlroW"

This is what I have come up with so far, it can post the letters of the words and keeps the words in the correct order but i can't figure out how to reverse the letters

Here is the Code:

Console.Write("> Please enter an input\n> ");
string userInput = Console.ReadLine();
string[] words = userInput.Split(' '); // creates an array of strings

foreach (string word in words) // loops through the array "words"
{
for (int i = word.Length; i >= 0; i--) // loop through word with for loop.
{
Console.WriteLine(word.Substring(0+i));
Console.ReadLine();

One last point, I'm trying to do this without using the reverse function

Thanks in advance for any assistance you all can lend me.
AnswerRe: Reversing letters in a word Pin
dan!sh 10-Mar-09 3:20
professional dan!sh 10-Mar-09 3:20 
AnswerRe: Reversing letters in a word Pin
Xmen Real 10-Mar-09 3:51
professional Xmen Real 10-Mar-09 3:51 
AnswerRe: Reversing letters in a word PinPopular
PIEBALDconsult10-Mar-09 4:39
mvePIEBALDconsult10-Mar-09 4:39 
JokeRe: Reversing letters in a word Pin
Xmen Real 10-Mar-09 5:28
professional Xmen Real 10-Mar-09 5:28 
GeneralRe: Reversing letters in a word Pin
Nagy Vilmos10-Mar-09 5:37
professionalNagy Vilmos10-Mar-09 5:37 
GeneralRe: Reversing letters in a word Pin
Johnny Jackson10-Mar-09 19:13
Johnny Jackson10-Mar-09 19:13 
AnswerRe: Reversing letters in a word Pin
Pete O'Hanlon10-Mar-09 4:58
mvePete O'Hanlon10-Mar-09 4:58 
GeneralRe: Reversing letters in a word [modified] Pin
harold aptroot10-Mar-09 5:35
harold aptroot10-Mar-09 5:35 
GeneralRe: Reversing letters in a word Pin
Pete O'Hanlon10-Mar-09 11:03
mvePete O'Hanlon10-Mar-09 11:03 
GeneralRe: Reversing letters in a word Pin
harold aptroot10-Mar-09 11:09
harold aptroot10-Mar-09 11:09 
GeneralRe: Reversing letters in a word Pin
Johnny Jackson10-Mar-09 19:10
Johnny Jackson10-Mar-09 19:10 
QuestionRe: Reversing letters in a word Pin
Luc Pattyn10-Mar-09 7:57
sitebuilderLuc Pattyn10-Mar-09 7:57 
GeneralRe: Reversing letters in a word [modified] Pin
Johnny Jackson10-Mar-09 19:11
Johnny Jackson10-Mar-09 19:11 
AnswerRe: Reversing letters in a word Pin
Johnny Jackson11-Mar-09 1:38
Johnny Jackson11-Mar-09 1:38 
QuestionCryptoStream Length Pin
BalajiRamasamy10-Mar-09 2:59
BalajiRamasamy10-Mar-09 2:59 
AnswerRe: CryptoStream Length Pin
BalajiRamasamy10-Mar-09 4:48
BalajiRamasamy10-Mar-09 4:48 
Questionwhich API to use? Pin
Try10-Mar-09 2:57
Try10-Mar-09 2:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.