This is not homework.
I am interested in scanning large amounts of textual content for many different search terms of interest.
I am told that using a "state diagram" is an efficient method to do this. I don't know if this is true and indeed it is likely that I will use a prebuilt product to do this. However, I would like to learn this as a matter of principle.
I would like it very much if you could show me a C# implementation of a state diagram. It would also help if you could comment the code and advise what state diagrams are and are not good for. Most helpful if you can teach me what you know.