Click here to Skip to main content
15,902,276 members
Home / Discussions / C#
   

C#

 
QuestionManaging windows updates (WUApilib) Pin
Jacob D Dixon13-Jul-11 4:32
Jacob D Dixon13-Jul-11 4:32 
AnswerRe: Managing windows updates (WUApilib) Pin
Not Active13-Jul-11 5:26
mentorNot Active13-Jul-11 5:26 
AnswerRe: Managing windows updates (WUApilib) Pin
Dan Mos13-Jul-11 6:51
Dan Mos13-Jul-11 6:51 
GeneralRe: Managing windows updates (WUApilib) Pin
Jacob D Dixon13-Jul-11 10:11
Jacob D Dixon13-Jul-11 10:11 
AnswerRe: Managing windows updates (WUApilib) [modified] Pin
Jacob D Dixon13-Jul-11 14:47
Jacob D Dixon13-Jul-11 14:47 
GeneralRe: Managing windows updates (WUApilib) Pin
Dan Mos13-Jul-11 21:16
Dan Mos13-Jul-11 21:16 
Questionalternatives of macros in c# Pin
aeman13-Jul-11 2:22
aeman13-Jul-11 2:22 
AnswerRe: alternatives of macros in c# Pin
BobJanova13-Jul-11 2:28
BobJanova13-Jul-11 2:28 
Constant values: public const fields, e.g.

class Port {
 public const ushort PORT1 = 0x378,
    DataPort = PORT1,
    ControlPort = PORT1+2;
}


Functional macros: static methods, e.g.

uint BV(int a) { return 1 << a; }

These will get inlined in release mode, generally. Note that you have to specify the type at compile time, so you might need to change how you use them a bit.

Also note that in C#/.Net everything must be in a class. Put constants and static methods in the class for which they're most appropriate.
AnswerRe: alternatives of macros in c# Pin
PIEBALDconsult13-Jul-11 2:46
mvePIEBALDconsult13-Jul-11 2:46 
AnswerRe: alternatives of macros in c# Pin
Shameel13-Jul-11 3:07
professionalShameel13-Jul-11 3:07 
GeneralRe: alternatives of macros in c# Pin
BobJanova13-Jul-11 4:06
BobJanova13-Jul-11 4:06 
GeneralRe: alternatives of macros in c# Pin
Shameel13-Jul-11 4:47
professionalShameel13-Jul-11 4:47 
AnswerRe: alternatives of macros in c# Pin
jschell13-Jul-11 9:13
jschell13-Jul-11 9:13 
AnswerRe: alternatives of macros in c# Pin
PIEBALDconsult19-Jul-11 14:40
mvePIEBALDconsult19-Jul-11 14:40 
QuestionUsing C++ Code in C# Project/Solution? Pin
AmbiguousName12-Jul-11 21:14
AmbiguousName12-Jul-11 21:14 
AnswerRe: Using C++ Code in C# Project/Solution? [modified] Pin
Pete O'Hanlon12-Jul-11 23:10
mvePete O'Hanlon12-Jul-11 23:10 
AnswerRe: Using C++ Code in C# Project/Solution? PinPopular
Shameel12-Jul-11 23:38
professionalShameel12-Jul-11 23:38 
GeneralRe: Using C++ Code in C# Project/Solution? Pin
Pete O'Hanlon12-Jul-11 23:43
mvePete O'Hanlon12-Jul-11 23:43 
GeneralRe: Using C++ Code in C# Project/Solution? Pin
Shameel13-Jul-11 2:20
professionalShameel13-Jul-11 2:20 
GeneralRe: Using C++ Code in C# Project/Solution? Pin
BobJanova13-Jul-11 0:11
BobJanova13-Jul-11 0:11 
GeneralRe: Using C++ Code in C# Project/Solution? Pin
Shameel13-Jul-11 2:21
professionalShameel13-Jul-11 2:21 
GeneralRe: Using C++ Code in C# Project/Solution? Pin
Manfred Rudolf Bihy13-Jul-11 0:40
professionalManfred Rudolf Bihy13-Jul-11 0:40 
GeneralRe: Using C++ Code in C# Project/Solution? Pin
Shameel13-Jul-11 2:21
professionalShameel13-Jul-11 2:21 
AnswerRe: Using C++ Code in C# Project/Solution? Pin
jschell13-Jul-11 9:16
jschell13-Jul-11 9:16 
GeneralRe: Using C++ Code in C# Project/Solution? Pin
AmbiguousName14-Jul-11 23:57
AmbiguousName14-Jul-11 23:57 

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.