CodeDom namespace

  • Thread starter Thread starter mark
  • Start date Start date
M

mark

Using the CodeDom namespace, how do you create a blank line in a method
primarily for formatting? Without it, autogenerated code is challenging to
read. I tried something like:

//Assume method is an instance of CodeMemberMethod.
method.Statements.Add(new CodeExpressionStatement(new CodeExpression()));

But it bombs because CodeExpression requires more properties to be set...

Suggestions? Thanks in advance.

Mark
 
Mark,
Have you considered adding a blank comment (with CodeCommentStatement) to
the autogenerated code?

Otherwise I don't know of a way to get an actual blank line.

Hope this helps
Jay
 
Back
Top