If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: Need Help with Parser C#

...instead of just typing in the one word I could type in something like, "I can't believe it was on" and it would output "I can't believe it was off" On and off being split word 1 and 2.

Hello again!

I presume you mean to go through the entire string and check each word against the dictionary you have been making, replacing words with the corresponding dictionary if there is one?

If so, you should use the String.Split() method to split the string into an array of strings, each corresponding to one word. Then check these in turn against the dictionary, and build up an output string based on the results of this check - either the original word or the dictionary word if there is one.

Re: Need Help with Parser C#

After a long morning of trying I decided to go with a Var method of doing it and it works. Thanks for the help though! Trying to figure out how to change the dictionary words in the output box to a different colour, hmmm

Re: Need Help with Parser C#

Originally Posted by dahrull

After a long morning of trying I decided to go with a Var method of doing it and it works. Thanks for the help though! Trying to figure out how to change the dictionary words in the output box to a different colour, hmmm

The different colour idea sounds nice. Just to get you started, you will need the RichTextBox to do this - a TextBox can only have one colour for all the text.