Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2006

Tip: Looking for answers? Try searching our database.

Serializaton Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martin - 07 Jul 2006 11:11 GMT
Hello,

I have a class which inherits from Component. I want to put this component
on a usercontrol. but i get the following error message:

The Type System.ComponentModel.Component isn't marked as serializable.

do i have to implement the ISerialization-interface?
Dave Sexton - 08 Jul 2006 02:26 GMT
Hi Martin,

Placing a Component 'on a UserControl', in the standard sense of the phrase,
doesn't require serialization.  In VS.NET you can drag your Component from
the Toolbox onto the UserControl designer and the Component will be added to
the designer's Component tray.  In code, you attach the component through
the Components collection of the UserControl, if it was created by VS.NET,
or otherwise just call dispose on the Component yourself.  There is no need
to actually attach a Component to a UserControl.

If this error is specific to your code, posting some of the code might be
more helpful to the newsgroup.

ISerialization doesn't exist in the framework, however ISerializable does.
Component derives from MarshalByRefObject so implementing ISerializable on a
Component is not a good design anyway.

HTH

> Hello,
>
[quoted text clipped - 4 lines]
>
> do i have to implement the ISerialization-interface?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.