Re: Nested class in component
From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 11/11/04
- Next message: anonymous_at_discussions.microsoft.com: "Re: SQLDMO.Backup and ProgressBar - help please"
- Previous message: Vincent Finn: "Re: Dynamic array with strong types?"
- In reply to: Edward Diener: "Nested class in component"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 11 Nov 2004 10:59:49 -0500
Edward,
The nested class can be anything you want it to be. The serialization
aspects will not really make a difference. You just have to be aware of the
semantics. If it is a reference that your class holds, and you pass the
reference around, then changes made to the object that reference points to
will be reflected in the main class. With a value type, it will be copied
upon assignment.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
"Edward Diener" <diener@ORsoftware.com> wrote in message
news:uDg0TZAyEHA.2200@TK2MSFTNGP09.phx.gbl...
>I want to create a nested class within my component class. The nested class
> will have public properties. Naturally I want those properties to be
> serialized just as those properties of my component are serialized. Should
> my nested class be:
>
> 1) A struct, with my component class holding a value variable for it.
> 2) A class, with my component class holding a reference variable for it.
>
> If the latter, does the nested class need to be derived from
> System.ComponentModel.Component also ?
>
>
- Next message: anonymous_at_discussions.microsoft.com: "Re: SQLDMO.Backup and ProgressBar - help please"
- Previous message: Vincent Finn: "Re: Dynamic array with strong types?"
- In reply to: Edward Diener: "Nested class in component"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading