Switch between two properties [modified]
-
Have anyone an idea how can switch between two properties(Resources.resx, Settings.settings) :confused:
I don't even know what this means ? Do you want to swap their values ? You need a third variable. int a = 1; int b = 2; // swap int c = a; a = b; b = c;
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
I don't even know what this means ? Do you want to swap their values ? You need a third variable. int a = 1; int b = 2; // swap int c = a; a = b; b = c;
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
Eh? That makes no sense whatsoever. If you have the same code, it's the same program - you can't have a different design.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before. -
You want to reuse code ? Put the code you want to reuse in a dll. By the way, nothing you're saying is making sense, I am making guesses. Try to explain what you want in more detail, please.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
You want to reuse code ? Put the code you want to reuse in a dll. By the way, nothing you're saying is making sense, I am making guesses. Try to explain what you want in more detail, please.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
daniel99 wrote:
For each design I build on code.
So do we all, but this doesn't tell us anything that you are trying to do. What problem are you trying to solve?
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before. -
Have anyone an idea how can switch between two properties(Resources.resx, Settings.settings) :confused:
Hello Daniel, Like the others, I'm not really sure if I understand you write, but I try to explain what you can do with a "#define". (I'm using VisualStudio) You can enable/disable a region during design time. In your case:
#define PropertyStyle
#if PropertyStyle
public bool GetSomething
{
get
{
return somestuffreturningbool_1();
}
}
#else
public bool GetSomething
{
get
{
return somestuffreturningbool_2();
}
}
#endifIf you compile it that way, you get the return value from somestuffreturningbool_1. Or: //#define PropertyStyle ... same code If you compile it that way, you get the return value from somestuffreturningbool_2. Hope it helps! All the best, Martin
-
daniel99 wrote:
For each design I build on code.
:cracks a smile:
Tech, life, family, faith: Give me a visit. I'm currently blogging about: 4 Exorcism Psalms from the Dead Sea Scrolls The apostle Paul, modernly speaking: Epistles of Paul Judah Himango