473,614 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

predefined constant for conditional compilation based on NETCF or Full framework?

Hi

Is there a constant i could use to force conditional compilation based on
whether i compile for CF or the Full NET framework ?

Johan


May 24 '07 #1
1 2180
Johan,

I imagine you would have to do this yourself. Basically, you can define
constants on the "Build" page of the "Properties " page for the project.
Under the "General" section, you can enter any conditional compilation
symbols you wish.

You can also place these symbols in your code, using the #define
directive.

You can also use the #if, #else, #elif, #endif directives to declare
sections of code that the compiler will use only if certain constants are
defined.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Sagaert Johan" <RE************ *@hotmail.comwr ote in message
news:OD******** ******@TK2MSFTN GP04.phx.gbl...
Hi

Is there a constant i could use to force conditional compilation based on
whether i compile for CF or the Full NET framework ?

Johan


May 24 '07 #2

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

Similar topics

3
8234
by: William Ryan | last post by:
This is going to be really stupid...but I often define method/properties with an Attribute of Debug. When I compile for build, they cease to exist. This is cool. However, is there a constant to the inverse? What I want to do is if I have a Debug Build, I want to skip all sorts of log-on stuff and the like. Right now, I'm manually setting a property in the build properties, but I was wondering if there is a more elegant way to do it..ie...
4
1980
by: Zarko Gajic | last post by:
Hi, Is there a way to include an #If ... directive in my code to enable conditional compilation based on the framework version? The idea is to be able to compile the "same" code for both the 1.0 framework and the 1.1 framework, something like #If "Framework 1.0 etected" then DO NOT USE SOME FUNCTION (as it uses some 1.1 only properties of certain
3
343
by: ME | last post by:
I would like to write a .NET Compact Framework App Simultaneously with a standard .NET App using Conditional Compilation. However I have run into a bit of, what I believe, a misunderstanding. How do you use condition compilation options to specify which library, specifically System.Windows.Forms, to use? It seems that I can have either one or the other, but not both, conditionally, in the same project. Does anyone have an example...
1
421
by: ravinder thakur | last post by:
hi all experts, i have a structure with the constant memebers such as one given below: typedef struct { const int cbcode; int cberror; } xtsetplatestaterec;
2
1787
by: Marty | last post by:
Hi, In VB.NET, what happen to constants when compiling? Are they copied at every place they are needed? Or the application has to refer to constants address each time it need it at run time? Thanks Marty
1
2293
by: Marek | last post by:
I use VS2005 with framework 2.0 and I just found a behavior I consider odd. Here is the code that illustrates th eproblem: public static void MethodA() { MethodB() } #if DEBUG
15
2898
by: skibud2 | last post by:
Consider this example: u8 my_array; for (i = 0; i < (sizeof(my_array)/sizeof(u8)); i++) { ... } In the standard C specification, is the evaluation of '(sizeof(my_array)/sizeof(u8))' to 10 guarenteed to happen at compile
2
1841
by: utab | last post by:
Dear all, I was looking at a simple code on an exercise question. In the code, there is a conditional inclusion dependent on __GNUC__ #include <algorithm> #include <iomanip> #ifndef __GNUC__ #include <ios> #endif
5
4287
by: Klaudiusz Bryja | last post by:
Hi, This is for NetCF 2.0. I need to create event handling code which using reflection. I have some parameters in XML which describe how event should be handled. I have code to create delegate: public class DelegateEx {
0
8130
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8579
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8433
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7093
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6088
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4052
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4127
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1747
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.