Click here to Skip to main content
15,914,322 members
Home / Discussions / C#
   

C#

 
GeneralUrgent help about calculator Pin
TA-RS18-Jul-05 22:42
TA-RS18-Jul-05 22:42 
GeneralRe: Urgent help about calculator Pin
tatchung18-Jul-05 22:50
tatchung18-Jul-05 22:50 
GeneralFinal Leg!! Pin
tatchung18-Jul-05 22:40
tatchung18-Jul-05 22:40 
GeneralRe: Final Leg!! Pin
Gavin Jeffrey18-Jul-05 22:54
Gavin Jeffrey18-Jul-05 22:54 
GeneralPredefined Macros Pin
Paul Selormey18-Jul-05 19:36
Paul Selormey18-Jul-05 19:36 
GeneralRe: Predefined Macros Pin
Christian Graus18-Jul-05 19:50
protectorChristian Graus18-Jul-05 19:50 
GeneralRe: Predefined Macros Pin
Paul Selormey18-Jul-05 21:36
Paul Selormey18-Jul-05 21:36 
GeneralRe: Predefined Macros Pin
leppie19-Jul-05 0:05
leppie19-Jul-05 0:05 
Paul Selormey wrote:
I do not see what is regretable about macro support in C#.

I agree, I have been thinking of using the C/C++ preprocesser on C# but havent got that far :p As CG said, DEBUG TRACE are common defines, but they are ONLY used inside the project your are compiling and has no effect on dependant assemblies, like u would have in C/C++.

So your best bet is to use something like VERSION_1 and VERSION_2. Remember you can use this to your advantage as follows (the compiler might have some issues IIRC):
#define VERSION_1
using AnyPositionList =
#if VERSION_1
IPositionList
#else
List<IPosition>
#endif
;

Now in your code:
AnyPositionList Positions
{
  get ..... ;
}

HTH Smile | :)

xacc-ide 0.0.15 now with C#, MSIL, C, XML, ASP.NET, Nemerle, MyXaml and HLSL coloring - Screenshots
GeneralRe: Predefined Macros Pin
Paul Selormey19-Jul-05 4:14
Paul Selormey19-Jul-05 4:14 
GeneralRe: Predefined Macros Pin
Christian Graus19-Jul-05 10:32
protectorChristian Graus19-Jul-05 10:32 
GeneralOptional Parameter in C# Pin
arechno18-Jul-05 18:55
arechno18-Jul-05 18:55 
GeneralRe: Optional Parameter in C# Pin
Christian Graus18-Jul-05 19:02
protectorChristian Graus18-Jul-05 19:02 
GeneralRe: Optional Parameter in C# Pin
arechno18-Jul-05 19:27
arechno18-Jul-05 19:27 
GeneralRe: Optional Parameter in C# Pin
Christian Graus18-Jul-05 19:29
protectorChristian Graus18-Jul-05 19:29 
GeneralRe: Optional Parameter in C# Pin
DavidNohejl19-Jul-05 3:08
DavidNohejl19-Jul-05 3:08 
GeneralRe: Optional Parameter in C# Pin
Dave Doknjas19-Jul-05 16:45
Dave Doknjas19-Jul-05 16:45 
GeneralRe: Optional Parameter in C# Pin
Christian Graus19-Jul-05 16:52
protectorChristian Graus19-Jul-05 16:52 
GeneralMy XmlFile looses its tree hierarchy after saving it Pin
rudy.net18-Jul-05 15:01
rudy.net18-Jul-05 15:01 
GeneralGetLParam function Pin
manhuber18-Jul-05 14:56
manhuber18-Jul-05 14:56 
GeneralRe: GetLParam function Pin
Luis Alonso Ramos18-Jul-05 15:30
Luis Alonso Ramos18-Jul-05 15:30 
GeneralASP('Cache-Control') Pin
felopater18-Jul-05 14:04
felopater18-Jul-05 14:04 
GeneralStatic Objects - Stupid Question Pin
Tristan Rhodes18-Jul-05 13:53
Tristan Rhodes18-Jul-05 13:53 
GeneralRe: Static Objects - Stupid Question Pin
leppie19-Jul-05 0:27
leppie19-Jul-05 0:27 
GeneralListView and VScrollBar. Pin
93Current18-Jul-05 13:36
93Current18-Jul-05 13:36 
GeneralRe: ListView and VScrollBar. Pin
Christian Graus18-Jul-05 13:45
protectorChristian Graus18-Jul-05 13:45 

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.