473,394 Members | 1,722 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,394 software developers and data experts.

codedom property return

I'm new to using the codedom to generate code and had a question about
returning a value from a method call in a property...

i have this...

property.GetStatements.Add(new CodeMethodReturnStatement(new
CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "_" +
fieldName)));

to create...

get { return _fieldname; }

but I need to create...

get { return differentstaticobject.staticmethodname<fieldtype>( ref
_fieldname); }

anyone know a good way to do this?

Thanks.

Mar 24 '08 #1
0 995

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: MikeG | last post by:
Attempting to add a property to a class using CodePropertySetValueReferenceExpression to add the set statement does not add (byval value as <type>) so using te property fails. Any ideas? MikeG
0
by: Shawn A. Hall | last post by:
First, I apologize if this isn't the right group to post this question, but I didn't see a newsgroup specific to CodeDom so here I am. On to my question: I am trying to use CodeDom to generate...
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...
4
by: Chuck Bowling | last post by:
I am using CodeDOM to generate source files. The classes being generated have a const string member. This member is referenced in an abstract base class but declared in the inheriting class. I...
0
by: Ashish | last post by:
hi All, I am a trying to use the CodeDOM namespace to generate some startup code for my project, there are couple of things i have questions on :) 1. Use of MemberAttribute enum in...
3
by: Alexey Lavnikov | last post by:
I'm playing with CodeDOM and CSharpCodeProvider. I've found the following possibilities: CodeDOM -> Assembly C# Source code -> Assembly I miss the C# Source code -> CodeDOM only. Is it there?...
2
by: CodeMonkey775 | last post by:
I'm having problems passing a variable to a method which is executed and compiled using CodeDom. The situation is I have a List<CellData> with cells, each containing a formula (like Excel). I am...
1
by: =?Utf-8?B?QU1lcmNlcg==?= | last post by:
I may have painted myself into a corner with GenerateInMemory=true. My app need a custom user step. Users want to code (sort of - they are not programmers) some refinements to a search...
0
by: thisismykindabyte | last post by:
Hello, I was wondering if anyone might know the easiest way to access static methods through a namespace(MyNamespace) from CodeDom generated code? Basically I have this in my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.