I’ve been doing some CodeDOM work in the last week or so after not having done it much in a while. What I’m finding most difficult is keeping track of which constructs are usable and which aren’t. Being a C# programmer, I tend to think about the code that way. The hardest part about using the CodeDOM is upleveling your thinking to deal with meta-programming. Describing the construct you want in the constructs of the CodeDOM can be challenging.
Given all that, I can understand why there are no CodeDOM constructs for
lock, etc. Those are C# language constructs that expand to some other CLR goo. But ,
while? There’s no way to make a while construct in CodeDOM. ???? I’m pretty sure there’s nothing language specific about a do…while construct. So you have to translate into a for…next instead. Sigh. I’m glad I don’t have to deal with delegates for this code. That’d be a third level abstraction, which is more than I can handle…