Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
QuestionQuick way to add block comments? Pin
jclark239b915-Nov-11 6:55
jclark239b915-Nov-11 6:55 
AnswerRe: Quick way to add block comments? Pin
OriginalGriff15-Nov-11 9:37
mveOriginalGriff15-Nov-11 9:37 
GeneralRe: Quick way to add block comments? Pin
jclark239b915-Nov-11 10:26
jclark239b915-Nov-11 10:26 
AnswerRe: Quick way to add block comments? Pin
BobJanova16-Nov-11 3:13
BobJanova16-Nov-11 3:13 
GeneralRe: Quick way to add block comments? Pin
jclark239b918-Nov-11 5:54
jclark239b918-Nov-11 5:54 
QuestionCircular dependency between classes Pin
vinayvraman15-Nov-11 6:34
vinayvraman15-Nov-11 6:34 
AnswerRe: Circular dependency between classes Pin
PIEBALDconsult15-Nov-11 6:46
mvePIEBALDconsult15-Nov-11 6:46 
AnswerRe: Circular dependency between classes Pin
Clive D. Pottinger15-Nov-11 6:54
Clive D. Pottinger15-Nov-11 6:54 
I am by no means an expert, so don't take this answer as gospel. I am posting more to see if the gurus out there will correct any bad assumptions I have.

As I believe: C++ is based on C. When C was created there was a need to keep compilers efficient - CPU time = $$$$. Therefore, the C language was designed with the idea that its compilers should not need to make multiple passes of the code. In a single-pass compiling strategy, you have to know what something is before you can use it. Hence procedures and variables had to be declared before they could be used. That led to the need for header files and forward declarations.

I don't know if C++ compilers really need forward declarations, or whether it was just a carry over from C. But either way, this why I believe C++ has header files too.

C# simply broke the tradition. If you allow your compiler to go over the code once and categorize the classes/methods/properties/fields and then go over it again to compile it, then there is no need for forward declaration, nor for header files.

Am I way off base, Gurus?
Clive Pottinger
Victoria, BC

GeneralRe: Circular dependency between classes Pin
harold aptroot15-Nov-11 7:01
harold aptroot15-Nov-11 7:01 
GeneralRe: Circular dependency between classes Pin
vinayvraman15-Nov-11 7:52
vinayvraman15-Nov-11 7:52 
GeneralRe: Circular dependency between classes Pin
CDP180216-Nov-11 0:41
CDP180216-Nov-11 0:41 
QuestionFinding a custom event using reflection Pin
Clive D. Pottinger15-Nov-11 4:07
Clive D. Pottinger15-Nov-11 4:07 
AnswerRe: Finding a custom event using reflection Pin
CDP180215-Nov-11 4:19
CDP180215-Nov-11 4:19 
AnswerRe: Finding a custom event using reflection Pin
Luc Pattyn15-Nov-11 4:40
sitebuilderLuc Pattyn15-Nov-11 4:40 
GeneralRe: Finding a custom event using reflection Pin
CDP180215-Nov-11 5:02
CDP180215-Nov-11 5:02 
GeneralRe: Finding a custom event using reflection Pin
Clive D. Pottinger15-Nov-11 6:18
Clive D. Pottinger15-Nov-11 6:18 
GeneralRe: Finding a custom event using reflection Pin
Clive D. Pottinger15-Nov-11 15:30
Clive D. Pottinger15-Nov-11 15:30 
AnswerRe: Finding a custom event using reflection Pin
Luc Pattyn15-Nov-11 15:37
sitebuilderLuc Pattyn15-Nov-11 15:37 
GeneralRe: Finding a custom event using reflection Pin
CDP180215-Nov-11 22:14
CDP180215-Nov-11 22:14 
GeneralRe: Finding a custom event using reflection Pin
Wayne Gaylard15-Nov-11 22:35
professionalWayne Gaylard15-Nov-11 22:35 
GeneralRe: Finding a custom event using reflection Pin
CDP180215-Nov-11 22:54
CDP180215-Nov-11 22:54 
GeneralRe: Finding a custom event using reflection Pin
BobJanova16-Nov-11 3:03
BobJanova16-Nov-11 3:03 
QuestionAssigned AppPool resets after completion of Web Deployment Setup when using Custom Actions Pin
www.Developerof.NET15-Nov-11 2:22
www.Developerof.NET15-Nov-11 2:22 
QuestionUnable to add event handler for Minimizing the Ribbon Control in WPF Pin
Kushagra Tiwari15-Nov-11 2:10
Kushagra Tiwari15-Nov-11 2:10 
AnswerRe: Unable to add event handler for Minimizing the Ribbon Control in WPF Pin
JF201515-Nov-11 3:27
JF201515-Nov-11 3:27 

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.