I am trying to generate some code using CodeDom. I wanted to know if there is any way to create CodeMemberMethod from a string. I found a method, but it generates assembly from string. I wanted to generate some methods from string. Is there any way?
+1
A:
Well, I found the answer. Hope it may help someone else:
We can use CodeSnippetStatement
to include code fragments that will be included directly in source without modification.
In addition to that, there is CodeSnippetCompileUnit
that will compile code units from string literal.
cornerback84
2010-03-16 07:35:07