Click here to Skip to main content
15,885,914 members
Home / Discussions / C#
   

C#

 
GeneralRe: adding data to event Pin
Meysam Mahfouzi10-Oct-03 18:04
Meysam Mahfouzi10-Oct-03 18:04 
GeneralRe: adding data to event Pin
gonenb11-Oct-03 9:19
gonenb11-Oct-03 9:19 
GeneralRe: adding data to event Pin
Meysam Mahfouzi14-Oct-03 18:13
Meysam Mahfouzi14-Oct-03 18:13 
GeneralExcel Pin
erbest9-Oct-03 21:07
erbest9-Oct-03 21:07 
GeneralDisable group components Pin
azusakt9-Oct-03 17:15
azusakt9-Oct-03 17:15 
GeneralRe: Disable group components Pin
David Stone9-Oct-03 18:24
sitebuilderDavid Stone9-Oct-03 18:24 
GeneralInterfacing with webcams Pin
Bog9-Oct-03 17:07
Bog9-Oct-03 17:07 
GeneralClass withing Class Pin
Nick Seng9-Oct-03 15:57
Nick Seng9-Oct-03 15:57 
I recently found out that you can actually declare a class within a class, like so:

public class Class1
{
    public class Class2
    {
        ....
    }
}


My question is, why would you ever want to that, as opposed to declaring the class separately like so:

public class Class2
{
}

public class Class1
{
    Class2 cls;
}


Is there some hidden advantage to doing it the former way that I'm not aware of?Confused | :confused:










Support Bone

GeneralRe: Class withing Class Pin
Guillermo Rivero9-Oct-03 16:20
Guillermo Rivero9-Oct-03 16:20 
GeneralRe: Class withing Class Pin
David Stone9-Oct-03 18:22
sitebuilderDavid Stone9-Oct-03 18:22 
GeneralRe: Class withing Class Pin
Guillermo Rivero9-Oct-03 21:12
Guillermo Rivero9-Oct-03 21:12 
GeneralRe: Class withing Class Pin
Guillermo Rivero9-Oct-03 21:30
Guillermo Rivero9-Oct-03 21:30 
GeneralRe: Class withing Class Pin
Blake Coverett9-Oct-03 16:34
Blake Coverett9-Oct-03 16:34 
GeneralRe: Class withing Class Pin
Nick Seng9-Oct-03 17:31
Nick Seng9-Oct-03 17:31 
GeneralRe: Class withing Class Pin
David Stone9-Oct-03 18:36
sitebuilderDavid Stone9-Oct-03 18:36 
GeneralRe: Class withing Class Pin
Blake Coverett9-Oct-03 20:44
Blake Coverett9-Oct-03 20:44 
GeneralRe: Class withing Class Pin
David Stone9-Oct-03 21:37
sitebuilderDavid Stone9-Oct-03 21:37 
GeneralRe: Class withing Class Pin
David Stone9-Oct-03 18:41
sitebuilderDavid Stone9-Oct-03 18:41 
GeneralRe: Class withing Class Pin
Nick Seng9-Oct-03 19:59
Nick Seng9-Oct-03 19:59 
GeneralCodes Pin
Anonymous9-Oct-03 12:00
Anonymous9-Oct-03 12:00 
GeneralRe: Codes Pin
Daniel M. Edwards9-Oct-03 17:56
Daniel M. Edwards9-Oct-03 17:56 
GeneralRe: Codes Pin
David Stone9-Oct-03 18:27
sitebuilderDavid Stone9-Oct-03 18:27 
GeneralRe: Codes Pin
leppie10-Oct-03 7:13
leppie10-Oct-03 7:13 
GeneralRe: Codes Pin
David Stone10-Oct-03 8:07
sitebuilderDavid Stone10-Oct-03 8:07 
GeneralAdvanced GUIs in C# Pin
Ronoc9-Oct-03 10:15
Ronoc9-Oct-03 10:15 

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.