Missing CodeDom Expressions?

  • Thread starter Thread starter Raphael Iloh
  • Start date Start date
R

Raphael Iloh

Hi all, I was wondering if anyone has found a way to represent the following
expressions 'AS IS' using the CodeDom:

1. if(!collection.Contains(value)) - negate an expression
2. i++ or i-- - increment or
decrement operator expression

I can re-write these example to look like these:
1. if(collection.Contains(value) == false)
2. i = (i+1) or i = (i-1)

but I'd rather have the statements 'AS IS'. I don't want to use
CodeSnippetExpression as it wouldn't be cross-language. Any helpful ideas
will be very welcomed.

Regards, Raphael
MCAD (C#)
 
....just a quick follow-up:
I've had problems creating a 'foreach' expression using CodeDom, so I
resorted to using a 'for' loop expression. Now is there a way to have an
expression as below:
for(int i = 0; i < collection.Count; i++){}

this is the best I could get:
int i;
for(i = 0; i < collection.Count; i = (i+1)){}

Is there a way to achieve the former expression using CodeDom, without the
use of CodeSnippetExpression?
 
Back
Top