For my project I'd like to display C# source code that I get from an external file. All I want to do is to parse that file and if possible display the code with syntax highlighting.
If also possible I'd like to divide the code I read into the various methods.
Where should I start?
An alternative way is to launch an external tool or app like viewer. For example, in Windows you can use VIM app to open a cs file in read-only and no modification mode:
Here are some codes to launch the tool:
I think VIM has CS syntax colorizer, or you can find some better one. It is free and has great search feature. However, VIM may not be good for none-VIM users. This is just an example. You can use other tools if you like to leverage other app strength.
I'd recommend AvalonEdit. It's easy to setup and use. Example
Example Output
Another take on syntax highlighting.