Click here to Skip to main content
15,881,898 members
Home / Discussions / C#
   

C#

 
GeneralLAN TicTacToe Pin
Member 365210629-Apr-08 8:23
Member 365210629-Apr-08 8:23 
GeneralRe: LAN TicTacToe Pin
carbon_golem29-Apr-08 8:43
carbon_golem29-Apr-08 8:43 
GeneralAdvice on Matching data Pin
MumbleB29-Apr-08 8:19
MumbleB29-Apr-08 8:19 
GeneralRe: Advice on Matching data Pin
Jimmanuel29-Apr-08 9:38
Jimmanuel29-Apr-08 9:38 
GeneralRadGrid, DataTable And Caption Problem Pin
KlimUser29-Apr-08 7:52
KlimUser29-Apr-08 7:52 
GeneralRe: RadGrid, DataTable And Caption Problem Pin
Bert delaVega29-Apr-08 8:17
Bert delaVega29-Apr-08 8:17 
GeneralRe: RadGrid, DataTable And Caption Problem Pin
KlimUser29-Apr-08 10:47
KlimUser29-Apr-08 10:47 
GeneralSomething basic Pin
Spykraft29-Apr-08 7:13
Spykraft29-Apr-08 7: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 7:24
mvePIEBALDconsult29-Apr-08 7:24 
GeneralRe: Something basic Pin
carbon_golem29-Apr-08 7:28
carbon_golem29-Apr-08 7:28 
GeneralRe: Something basic Pin
PIEBALDconsult29-Apr-08 12:11
mvePIEBALDconsult29-Apr-08 12:11 
GeneralRe: Something basic Pin
Spykraft29-Apr-08 7:38
Spykraft29-Apr-08 7:38 
GeneralRe: Something basic Pin
carbon_golem29-Apr-08 8:06
carbon_golem29-Apr-08 8:06 
GeneralRe: Something basic Pin
Spykraft29-Apr-08 12:11
Spykraft29-Apr-08 12:11 
GeneralRe: Something basic Pin
carbon_golem29-Apr-08 16:59
carbon_golem29-Apr-08 16:59 
GeneralRe: Something basic Pin
PIEBALDconsult29-Apr-08 9:31
mvePIEBALDconsult29-Apr-08 9:31 
GeneralDatagridview and keyenter Pin
Canann29-Apr-08 4:43
Canann29-Apr-08 4:43 
QuestionRe: Datagridview and keyenter Pin
Canann30-Apr-08 2:51
Canann30-Apr-08 2:51 
QuestionHow to generate Typed DataSet with CodeDom ? Pin
hdv21229-Apr-08 3:03
hdv21229-Apr-08 3:03 
Generalanti-pattern in GC Pin
George_George29-Apr-08 2:59
George_George29-Apr-08 2:59 
GeneralRe: anti-pattern in GC Pin
Colin Angus Mackay29-Apr-08 4:03
Colin Angus Mackay29-Apr-08 4:03 
GeneralRe: anti-pattern in GC Pin
George_George29-Apr-08 4:26
George_George29-Apr-08 4:26 
GeneralRe: anti-pattern in GC Pin
led mike29-Apr-08 4:53
led mike29-Apr-08 4:53 
GeneralRe: anti-pattern in GC Pin
George_George29-Apr-08 4:59
George_George29-Apr-08 4:59 
GeneralRe: anti-pattern in GC Pin
led mike29-Apr-08 5:40
led mike29-Apr-08 5: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.