473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

doubt using CodeExpression(codeDOM) in C#

27
I am doing my project work using codeDOM in C#.

Can any one tell me how to combine two CodeExpression objects as a single argument.

VWException objException =
new VWException(0, "message" + e.Message);

I want to generate the above line, but its not possible to combine CodePrimitiveExpression and CodePropertyReferenceExpression as a single expression (see the second argument of the code).

Can any one tell the answer means its very use for me?
Thank you in advance!
Mar 27 '07 #1
2 2208
kenobewan
4,871 Expert 4TB
In order to combine two expressions you need to use a binary operator. The CodeBinaryOperatorExpression allows this. Given expr1 and expr2 you can use the following to generate an addition:

Expand|Select|Wrap|Line Numbers
  1. new CodeBinaryOperatorExpression(expr1, CodeBinaryOperatorType.Add, expr2);
HTH.
Mar 29 '07 #2
xievvv
27
Thanks a lot!
Mar 30 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: new1s.on.sympatico.ca | last post by:
Hey There! Any one have any ideas on how to prevent the DOS window from appearing when executing an Output Assembly (exe) generated using CodeDom? Thanks, Roland
2
by: John Mark Howell | last post by:
BlankCan anyone give me an idea as to how to use the CodeDom to edit code? I would like to perform mass changes (such as putting logging messages as the first statement in all methods with method...
3
by: Tapas | last post by:
Hi, Generating a .cs file using CodeDom. It generates the class fine. But i have few queries about class generation. 1. How to create a protected member? By default it generates a private...
0
by: Saradhi | last post by:
Hi All , I am using the Code model for Generating the VB code on the Fly. I am able to generate a new class with the Variables, Fields and Methods I want. Now What I want is the facility to...
1
by: fred_mumble | last post by:
I have been testing various techniques to run "script" code which will be stored in a SQL database and executed dynamically at runtime. The scripts are essentially business rules that result in a...
0
by: SCJ23 | last post by:
i am lazy but curious. after quickly scanning the CodeDOM classes, i am curious to know whether or not existing code can be examined via the CodeDOM classes.
1
by: alexrait1 | last post by:
how to express with codedom this: a.b.c ?
2
by: Venkat | last post by:
Hi, Can anyone let me know how to declare a local const in a method using CodeDOM? I am trying to get an output that looks like this: public void SomeMethod() { const int MyInteger = 56; } ...
6
by: moondaddy | last post by:
will CodeDom create XAML windows or just regular windows forms? If so, how to I tell it to create a xaml window instead of a windows form? thanks -- moondaddy@noemail.noemail
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.