Click here to Skip to main content
15,905,607 members
Home / Discussions / C#
   

C#

 
AnswerRe: Reading next block of data on button click event Pin
Wayne Gaylard15-Nov-11 19:42
professionalWayne Gaylard15-Nov-11 19:42 
AnswerRe: Reading next block of data on button click event Pin
BobJanova16-Nov-11 3:09
BobJanova16-Nov-11 3:09 
QuestionTimers & editing controls Pin
Krylosac15-Nov-11 16:35
Krylosac15-Nov-11 16:35 
AnswerRe: Timers & editing controls Pin
Wayne Gaylard15-Nov-11 17:06
professionalWayne Gaylard15-Nov-11 17:06 
GeneralRe: Timers & editing controls Pin
Krylosac15-Nov-11 17:39
Krylosac15-Nov-11 17:39 
GeneralRe: Timers & editing controls Pin
Wayne Gaylard15-Nov-11 17:53
professionalWayne Gaylard15-Nov-11 17:53 
AnswerRe: Timers & editing controls Pin
Luc Pattyn15-Nov-11 17:28
sitebuilderLuc Pattyn15-Nov-11 17:28 
GeneralRe: Timers & editing controls Pin
BobJanova16-Nov-11 3:11
BobJanova16-Nov-11 3:11 
GeneralRe: Timers & editing controls Pin
Krylosac16-Nov-11 3:24
Krylosac16-Nov-11 3:24 
AnswerRe: Timers & editing controls Pin
Not Active15-Nov-11 17:28
mentorNot Active15-Nov-11 17:28 
QuestionHow To Create Classic Menu in C# desktop apll. Pin
Devdattahack1015-Nov-11 12:27
Devdattahack1015-Nov-11 12:27 
AnswerRe: How To Create Classic Menu in C# desktop apll. Pin
PIEBALDconsult15-Nov-11 13:42
mvePIEBALDconsult15-Nov-11 13:42 
Questionc# image pixel shrink Pin
Member 773856115-Nov-11 8:43
Member 773856115-Nov-11 8:43 
AnswerRe: c# image pixel shrink Pin
Peter_in_278015-Nov-11 13:23
professionalPeter_in_278015-Nov-11 13:23 
GeneralRe: c# image pixel shrink Pin
Smithers-Jones15-Nov-11 22:23
Smithers-Jones15-Nov-11 22:23 
AnswerRe: c# image pixel shrink Pin
BillWoodruff16-Nov-11 14:54
professionalBillWoodruff16-Nov-11 14:54 
QuestionQuick way to add block comments? Pin
jclark239b915-Nov-11 6:55
jclark239b915-Nov-11 6:55 
AnswerRe: Quick way to add block comments? PinPopular
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 
Consider the following example..

C#
public class Student
{
    public string Name { get; set; }
    public IList<Course> Courses { get; set; }
}

public class Course
{
    public string Name { get; set; }
    public IList<Student> Students { get; set; }
}



In this example a circular dependency exists between Student class and Course class. The scenario arises when we are dealing with entity framework - wherein db tables are created as classes for a Student database management system.

In case of C++ we use the concept of forward declaration for telling a class 'A' that another class called 'B' exists even before defining the class 'B'.

Can anybody explain how C# compiler solves this problem of circular dependency between classes?


PS: Please avoid telling me that the classes sould be redesigned to avoid circular dependency. The question is not related to designing since the below mentioned classes are very much from day-to-day programming scenarios.
If asking a question is bad; then not knowing the answer is worse!

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 
GeneralRe: Circular dependency between classes Pin
harold aptroot15-Nov-11 7:01
harold aptroot15-Nov-11 7:01 

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.