Serialization of derived class inherited from a base class that is non serializable

Posted on 2008-11-11
Last Modified: 2013-12-17
I have a class derived inherited from System.Web.UI.MobileControls.MobileControl

class derived:System.Web.UI.MobileControls.MobileControl


I want to serialize this class, but the base class System.Web.UI.MobileControls.MobileControl
is not serializable.
Is there an alternative to serialize the derived class without serializing the base class. ?
Question by:sharpodal
    LVL 23

    Expert Comment

    by:Jens Fiederer
    Perhaps you could make an adapter class that is NOT derived from a non-serializable class, but which CONTAINS a (non-serialized) instance of your derived class.

    This instance would be created upon deserialization, and configured with serializable information in your adapter class....
    LVL 26

    Accepted Solution

    have a look at the following link - there are 2 links provided in that link might be helpful for you - ragi

    Author Closing Comment


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
    Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now