---
title: "CodeDOM adventures and oddities"
url: "https://osherove.com/blog/2004/4/9/codedom-adventures-and-oddities.md"
canonical: "https://osherove.com/blog/2004/4/9/codedom-adventures-and-oddities.html"
published: "2004-04-09T21:43:00"
updated: "2004-04-09T21:43:00"
tags: [".Net Quotations"]
author: "Roy Osherove"
description: "Omer posts some interesting bits on using the CodeDOM code generator , including some tricks. One important thing to know is how the code generator will generate string declarations. Omer discovers that you can't make…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# CodeDOM adventures and oddities

By Roy Osherove April 9, 2004 In [.Net Quotations](https://osherove.com/blog/category/net-quotations)

**Historical article** · Originally published April 9, 2004; technical details may be outdated.

[Omer posts some interesting bits on using the CodeDOM code generator](http://weblogs.asp.net/okloeten/archive/2004/04/09/110491.aspx), including some tricks.

One important thing to know is how the code generator will generate string declarations. Omer discovers that you can't make it perpend a “@” at the string's start. it does it automatically using a hard coded set of rules. Some more oddities lie there, but [Omer](http://weblogs.asp.net/okloeten) points them better than I can. He has much more experience than me on this one.

The subject came up because I'm using some of Omer's code as a basis for a plugin for [The next Regulator](http://regulator.sourceforge.net/)., coming out in a few days. The plugin, you may be surprised to know, generates C# or VB.Net code from the current regex.

BTW, Omer is one of those guys who are really bright and every time we talk it astounds me just how much knowledge he has that I seem to have little clue about. He should definitely post more. Funny thing, he's pretty young (like 20?). I'm scared to think what he's going to be like in 10 years. \*shudder\*

## More in .Net Quotations

[All posts in .Net Quotations](https://osherove.com/blog/category/net-quotations)

- Apr 13, 2004

    ### [Code DOM articles galore](https://osherove.com/blog/2004/4/13/code-dom-articles-galore.html)

- Apr 13, 2004

    ### [Microsoft Research Academic Days in Israel](https://osherove.com/blog/2004/4/13/microsoft-research-academic-days-in-israel.html)

- Apr 6, 2004

    ### [Good AppDomain FAQ](https://osherove.com/blog/2004/4/6/good-appdomain-faq.html)

- Apr 5, 2004

    ### [Sample chapter from "The Visual Basic .NET Programming Language" available](https://osherove.com/blog/2004/4/5/sample-chapter-from-quotthe-visual-basic-net-programming-lan.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
