Click here to Skip to main content
15,887,889 members
Home / Discussions / C#
   

C#

 
GeneralRe: adding lables to ListBox Pin
danzar21-Dec-08 18:36
danzar21-Dec-08 18:36 
QuestionChange product output path Pin
Ronenb21-Dec-08 4:59
Ronenb21-Dec-08 4:59 
AnswerRe: Change product output path Pin
dan!sh 21-Dec-08 5:35
professional dan!sh 21-Dec-08 5:35 
GeneralRe: Change product output path Pin
Ronenb21-Dec-08 5:56
Ronenb21-Dec-08 5:56 
Question<Module> etc. Pin
Lev Danielyan21-Dec-08 2:50
Lev Danielyan21-Dec-08 2:50 
AnswerRe: <Module> etc. Pin
Not Active21-Dec-08 6:34
mentorNot Active21-Dec-08 6:34 
GeneralRe: <Module> etc. Pin
Lev Danielyan21-Dec-08 6:53
Lev Danielyan21-Dec-08 6:53 
QuestionPreprocessor directives Pin
Deresen21-Dec-08 2:19
Deresen21-Dec-08 2:19 
Hello everyone,

I've got a project and I am making a version 2 of this project. Though still version 1 must be active and used.
So I'm using preprocessor directives to assign the extra parts for the program for version 2. But in this case I have to place a #define VERSION_2 in every file where I want to make a difference between version 1 and version 2.
I would like to know if it is possible to put a #define in one file and use it in another file.

For example:
//file test.cs

//#define VERSION_1
#define VERSION_2

namespace Prog.test
{
  class test
  {
#if VERSION_1
     doThat();
#elif VERSION_2
     doAnother();
#endif
  }
}

//file chair.cs

namepace Prog.chair
{
  class chair
  {
#if VERSION_1 //does not work, because not defined
     setHeight();
#elif VERSION_2 //does not work, because not defined
     setWidth();
#endif
  }
}

AnswerRe: Preprocessor directives Pin
User 665821-Dec-08 2:23
User 665821-Dec-08 2:23 
GeneralRe: Preprocessor directives Pin
Deresen21-Dec-08 2:28
Deresen21-Dec-08 2:28 
AnswerRe: Preprocessor directives Pin
#realJSOP21-Dec-08 3:05
mve#realJSOP21-Dec-08 3:05 
GeneralRe: Preprocessor directives Pin
User 665821-Dec-08 3:31
User 665821-Dec-08 3:31 
GeneralRe: Preprocessor directives Pin
#realJSOP21-Dec-08 3:37
mve#realJSOP21-Dec-08 3:37 
QuestionC# COM object help Pin
llihp21-Dec-08 0:57
llihp21-Dec-08 0:57 
QuestionSecuring DLLs Pin
Xmen Real 20-Dec-08 23:29
professional Xmen Real 20-Dec-08 23:29 
AnswerRe: Securing DLLs Pin
Christian Graus20-Dec-08 23:55
protectorChristian Graus20-Dec-08 23:55 
GeneralRe: Securing DLLs Pin
#realJSOP21-Dec-08 0:05
mve#realJSOP21-Dec-08 0:05 
GeneralRe: Securing DLLs Pin
Xmen Real 21-Dec-08 0:10
professional Xmen Real 21-Dec-08 0:10 
GeneralRe: Securing DLLs Pin
#realJSOP21-Dec-08 3:03
mve#realJSOP21-Dec-08 3:03 
GeneralRe: Securing DLLs Pin
Xmen Real 21-Dec-08 3:26
professional Xmen Real 21-Dec-08 3:26 
GeneralRe: Securing DLLs Pin
Giorgi Dalakishvili21-Dec-08 5:19
mentorGiorgi Dalakishvili21-Dec-08 5:19 
GeneralRe: Securing DLLs Pin
Xmen Real 21-Dec-08 5:27
professional Xmen Real 21-Dec-08 5:27 
GeneralRe: Securing DLLs Pin
Christian Graus21-Dec-08 9:02
protectorChristian Graus21-Dec-08 9:02 
GeneralRe: Securing DLLs Pin
Xmen Real 21-Dec-08 13:36
professional Xmen Real 21-Dec-08 13:36 
AnswerRe: Securing DLLs Pin
Giorgi Dalakishvili21-Dec-08 0:50
mentorGiorgi Dalakishvili21-Dec-08 0:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.