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#
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in SERIALIZATION
- Deserialize XML with optional different name
- How to serialize Any with Kotlin serialization?
- Flink Stuck on Broadcast
- How do I add serialization into Kotlin Jet Compose project?
- fix django login bug
- How to execute code "before_serialize"? or How can I sanitize attributes before they are serialized?
- Ical.net Serialization Error when serializing 12:00 AM Midnight
- how can i unserialize Symfony transport messages?
- How to change a queryset in Django?
- How to serialize object to JSON format which inherits IList and has other properties
- Json.stringify() is ignoring a object property after xlsx.sheet_to_json
- how to make aiogram.Message from telethon.Message
- implementin filter for vector of custom struct in RUST
- How to properly Serialize/Deserialize an ArrayList with Custom Objects?
- Append serialized objects to a single file and load Rust
Related Questions in CONTAINERS
- AttributeError: module 'numba' has no attribute 'generated_jit'
- Docker container does not find System Daemon of nordvpn after reboot
- How container isolation is being achieved for windows containers which use process isolation mode?
- Installing dotnet8 on amazonlinux 2023 image through dockerfile
- Mount Azure file share on Azure container app
- Spring Boot application container memory footprint (Java 21)
- Error initializing a docker container after installing transmission-daemon and nordvpn
- How to ping IPv6 address of link-local from container attached to bridge network
- C++ ordered map optimized with index access
- How to run a script after mysql container initialization?
- Azure Form Intelligence Connected Container performance
- Attaching a debugger to a container/instance running on a K8s Pod?
- Connecting Azure container app Spring boot backend to Azure container app Neo4j database
- Visual Studio 2022 free certificate problem. "cannot import key file " how to fix
- Open VS code from terminal in devcontainer?
Related Questions in SERIALIZABLE
- Is there any solution that enable LAZY FETCH when implementing Serializable
- How to check if a [Serializable] class object is null or not in Unity C#?
- Serialization of 3rd party subtyped classes at runtime in Kotlin
- How to declare an unmodifiable serializable List in Java
- Encapsulating member variables of a raw C# class that was marked as serializable
- Dump with SERIALIZABLE more consistent than `--single-transaction` (REPEATABLE READ) in MySQL
- Handling inconsistency in a highly normalized DB with long load times
- KTOR: Please ensure that class is marked as '@Serializable' and that the serialization compiler plugin is applied
- Spark with Scala: Task not serializable due to sparkContext
- Migrating Old Serialized Data to Externalizable Data
- springframework.data.redis.serializer.SerializationException: Cannot serialize
- select for update and insert on SERIALIZABLE isolation level
- Attribute @click is not serializable as XML 1.0., and other Errors
- How to create a new instance Serializable class by reflection in Kotlin?
- Issue while parsing a list of objects retrieved from Firebase Firestore collection
Related Questions in COMPONENTMODEL
- How to change the Browsable attribute of a field class after its instantiation
- Can I use other attribute arguments than numbers in DataAnnotations.StringLength?
- Why dataAnnotations dosen't valid the CourseList porperty of the Stuent?
- Get c# attribute applied to this instance?
- Trying to install NuGet package programmatically - Package.GetGlobalService returns null
- What is the difference between the component architecture and multi-transclusion model in AngularJS?
- Is it possible to hide properties of a class by default, e.g. in a DataGridView?
- How to manage both Deployment and Component UML Models in Sparx EA?
- ASP.NET MVC3: ValidationType ModelClientValidationRule
- Custom Validation using ValidationAttribute does not fire Client side validation
- How to disable designer in derived classes in following generations
- How to programatically turn on/off a Data Annotation Validation Attribute
- Removing Required Attribute from Class but MVC3 still won't post the form without a value in the text box
- Hiding elements and categories for custom controls
- What is the difference between IEditableObject and IRevertibleChangeTracking?
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 # Hahtags
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.