I have the requirement to generate and read some CS classes with a DSL, I have adopted one method for reading the CS files using EnvDTE and my colleague has used CodeDom to produce the CS files.
Is it just sugar or is there a big difference between...
codeClass.AddFunction("DoSomething", vsCMFunction.vsCMFunctionFunction, "bool");
and
CodeMemberMethod membMethod = new CodeMemberMethod();
membMethod.Attributes = MemberAttributes.Static;
membMethod.ReturnType = new CodeTypeReference("bool");
membMethod.Name = "DoSomething";
I subjectively prefer the EnvDTE but do not know what the 'real' difference is.
Info: C#, Visual Studio 2010