Click here to Skip to main content
15,565,146 members
Home / Discussions / C#
   

C#

 
GeneralLAN TicTacToe Pin
Member 365210629-Apr-08 9:23
Member 365210629-Apr-08 9:23 
GeneralRe: LAN TicTacToe Pin
carbon_golem29-Apr-08 9:43
carbon_golem29-Apr-08 9:43 
GeneralAdvice on Matching data Pin
MumbleB29-Apr-08 9:19
MumbleB29-Apr-08 9:19 
GeneralRe: Advice on Matching data Pin
Jimmanuel29-Apr-08 10:38
Jimmanuel29-Apr-08 10:38 
GeneralRadGrid, DataTable And Caption Problem Pin
KlimUser29-Apr-08 8:52
KlimUser29-Apr-08 8:52 
GeneralRe: RadGrid, DataTable And Caption Problem Pin
Bert delaVega29-Apr-08 9:17
Bert delaVega29-Apr-08 9:17 
GeneralRe: RadGrid, DataTable And Caption Problem Pin
KlimUser29-Apr-08 11:47
KlimUser29-Apr-08 11:47 
GeneralSomething basic Pin
Spykraft29-Apr-08 8:13
Spykraft29-Apr-08 8:13 
Okay, so me and my buddy were having this discussion today.

Assume a case in C# where we have two classes, class A and class B, with A having an array of objects of B.

Now when we want to use these classes from a different class C (without inheritance that is), we create two instances of A and B. However all members of class A and a few from B are to be initialized before they can be used in C.

So the argument was abouthow to have this initializing logic in the constructor for class A. But then that would mean having a part of the logic also in the constructor for class B.

Instead why not having a public method in class A which takes care of this logic?

The argument stopped at how much of memory duz it take to invoke and execute two constructors instead of one public method?

Any takers?

------------------------------------
Vision is the ability to see the invisible

GeneralRe: Something basic Pin
PIEBALDconsult29-Apr-08 8:24
professionalPIEBALDconsult29-Apr-08 8:24 
GeneralRe: Something basic Pin
carbon_golem29-Apr-08 8:28
carbon_golem29-Apr-08 8:28 
GeneralRe: Something basic Pin
PIEBALDconsult29-Apr-08 13:11
professionalPIEBALDconsult29-Apr-08 13:11 
GeneralRe: Something basic Pin
Spykraft29-Apr-08 8:38
Spykraft29-Apr-08 8:38 
GeneralRe: Something basic Pin
carbon_golem29-Apr-08 9:06
carbon_golem29-Apr-08 9:06 
GeneralRe: Something basic Pin
Spykraft29-Apr-08 13:11
Spykraft29-Apr-08 13:11 
GeneralRe: Something basic Pin
carbon_golem29-Apr-08 17:59
carbon_golem29-Apr-08 17:59 
GeneralRe: Something basic Pin
PIEBALDconsult29-Apr-08 10:31
professionalPIEBALDconsult29-Apr-08 10:31 
GeneralDatagridview and keyenter Pin
Canann29-Apr-08 5:43
Canann29-Apr-08 5:43 
QuestionRe: Datagridview and keyenter Pin
Canann30-Apr-08 3:51
Canann30-Apr-08 3:51 
QuestionHow to generate Typed DataSet with CodeDom ? Pin
hdv21229-Apr-08 4:03
hdv21229-Apr-08 4:03 
Generalanti-pattern in GC Pin
George_George29-Apr-08 3:59
George_George29-Apr-08 3:59 
GeneralRe: anti-pattern in GC Pin
Colin Angus Mackay29-Apr-08 5:03
Colin Angus Mackay29-Apr-08 5:03 
GeneralRe: anti-pattern in GC Pin
George_George29-Apr-08 5:26
George_George29-Apr-08 5:26 
GeneralRe: anti-pattern in GC Pin
led mike29-Apr-08 5:53
led mike29-Apr-08 5:53 
GeneralRe: anti-pattern in GC Pin
George_George29-Apr-08 5:59
George_George29-Apr-08 5:59 
GeneralRe: anti-pattern in GC Pin
led mike29-Apr-08 6:40
led mike29-Apr-08 6:40 

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.