I am trying to parse the source simple.cs file using the following code:
CodeDomProvider provider = CodeDomProvider.CreateProvider("CSharp"); var compileUnit = provider.Parse(File.OpenText(filename));
This gives me a NotImplementedException:
"This CodeDomProvider does not support this method"
Is it true that .NET does not provide the implementation of parsing code in C #? Or am I just using this class incorrectly?
Edit: the reason for this is because I want to play around with some methods for static code analysis. Compiling or executing code is not required for my research.
source share