Missing CodeDOM Expression?

R

Raphael Iloh

== POSTED THIS ISSUE SOME TIME AGO BUT GOT NO RESPONSE, IDEAS STILL NEEDED
==

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
3. foreach(int i in integ) - foreach statement

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

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

Guest

Hi Raphael
I havent seen how you can express these in the CodeDom, so i'm no help. But i have a problem of my own and there arent many people around that are doing CodeDom work, so i thought i'd ask you

I'm tryint to pass an enumeration into a method, but cant figure out how to create an enum value in the CodeDom. Take MessageBox.Show("yea", "neat", MessageBoxButtons.OKCancel) for example. I can create a CodeMethodInvokeExpression for MessageBox.Show. And I can create the first two CodeExpression's for the caption and title of the messagebox, but i cant figure out how to create a CodeExpression for MessageBoxButtons.OkCancel to be the third expression in the CodeExpression array that gets used when creating the CodeMethodInvokeExpression for MessageBox.Show

Do you have any ideas
Thanks
John
 

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

Top