Missing CodeDom Expressions?


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#)
 
Ad

Advertisements

R

Raphael Iloh

....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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top