Is it possible to serialize (binary) a System.ComponentModel.Container?
Serialize ComponentModel.Container?
459 Views Asked by IAbstract At
2
There are 2 best solutions below
3
Marc Gravell
On
What is it you actually want to do here? As has been noted, you can't use BinaryFormatter unless the type is serializable, but you would also need to consider all the things that might be contained in the container. They would also need to be serializable.
You can get around the "must be [Serializable]" issue by not using BinaryFormatter, but most other serializers (for example XmlSerializer) would have a problem with not knowing all the subclasses up-front, and things like non-settable properties.
If you have the right .NET versions, you could also consider things like XamlWriter, which may provide some interesting possibilities.
Related Questions in C#
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in SERIALIZATION
- Saving FileSystemInfo Array to File
- Serializing to disk and deserializing Scala objects using Pickling
- Serializing TypeInfo / Type across .Net Platforms
- How can I send multiple objects over one socket in java?
- Non-intruisive Boost serialization of labelled enums C++
- While Conditions for Deserializing Multiple Objects in Java
- Xml serializing and deserializing with memory stream
- How do I Serialize a JMS Message?
- Serializable class with ISerializable constructor
- Serializing a struct whose definition is not known
- XML Deserializing lists with objects only getting one level
- Using active model serializers for json and csv in Rails?
- Why does Java serialization take up so much space?
- Using Gson to serialize strings with \n in them
- How to covert JSON field name to a Java compatible property name while doing Jackson de-serialisation?
Related Questions in CONTAINERS
- Positioning child at bottom of parent with scroll
- Where are docker images and containers stored when we use it with Windows?
- c++ container very efficient at adding elements to the end
- Set-like alternative for yaml files
- Julia: Enforce constraints on objects in a container?
- Control snapping on resize in C# scrollable container
- Creating a vertically draggable container in Adobe Flex 3.5
- How to set the read ACL on container in open stack swift such that allow Read for all users and deny for one user
- Which STL container(s)/algorithm(s) could I use to solve this?
- Persistent error coming from libusb0
- Make responsive text relative to responsive image?
- Initializing database in the base image of a running container
- Is there unique-value / set container in java-script
- Can we change width of container in css using Bootstrap3
- Use of container docker as a proxy for CF app to get public IP
Related Questions in SERIALIZABLE
- Serializable class with ISerializable constructor
- Error in passing data between activites android while using a custom object
- Redis Serialization and Deserialization
- Implementing both Serializable and Parcelable interfaces from an object in Android - conflict
- Serializing look up object for App Fabric
- What are the conditions for Serializable?
- java.util.Set, java.util.List Serializable issue
- Could anyone tell me whats use of implements interface which extended with "Serializable" interface with example?
- how to pass a list of objects of View in a bundle
- Sending Parcelable Objects as Serializable
- Setting non-serializable attribute value into HttpSession
- WRITE over READ in mysql
- Implement Serializable to a class implementing an Interface
- Including outside variables when serializing an object
- HtmlUnit: HtmlPage Serialization Exception
Related Questions in COMPONENTMODEL
- How to disable designer in derived classes in following generations
- C# show browsable child properties in designer
- Why dataAnnotations dosen't valid the CourseList porperty of the Stuent?
- .NET Component Model explanation
- Get c# attribute applied to this instance?
- Programmatically Hide Property in PropertyGrid
- Hiding elements and categories for custom controls
- How do I use the service locator implementation in System.ComponentModel for dependency injection in a WinForms application?
- Is it possible to hide properties of a class by default, e.g. in a DataGridView?
- What is the difference between IEditableObject and IRevertibleChangeTracking?
- Can I use other attribute arguments than numbers in DataAnnotations.StringLength?
- How to change the Browsable attribute of a field class after its instantiation
- Removing Required Attribute from Class but MVC3 still won't post the form without a value in the text box
- How to manage both Deployment and Component UML Models in Sparx EA?
- Trying to install NuGet package programmatically - Package.GetGlobalService returns null
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
No, it is not marked serializable.