Mike Talbot's Blog
Posts Tagged Share silverlight class .NET
Serializing classes between Silverlight and .NET 4
Posted by whydoidoit in Programming on September 3, 2010
I’ve realized that I didn’t detail how to ensure you can serialize your own classes between Silverlight and .NET 4 using my SilverlightSerializer class.
The vital thing to do in these circumstances is to define the classes you want to share in a Silverlight assembly that only references System, System.Core and mscorlib. These are the requirements for assemblies that can be used in both types of project. If you define your classes in this way then they can be deserialized on the back end without a problem, reference anything else and it won’t work. Fortunately most of what you will need is included in those system assemblies!
Share silverlight class .NET, Silverlight, Silverlight Binary Serialization
Welcome!
All code on this blog is open source. You are free to use all of the code on this blog for any purpose, but it all comes without any warranty whatsoever. You must not use any code on this blog to infringe any patent and I can offer no warranty that the presence of code here implies that it is not patented for some purpose by the author or another party. No code posted by the author has been patented for the basic application demonstrated.
The posts on this blog come as a result of a business application I developed for Silverlight and a game I am writing in Unity. I've tried to write posts that reflect things I've searched for and not been able to find elsewhere.
I decided to publish this work as a quid pro quo for all of the hugely useful articles and examples I've learned from and incorporated.
I'm also really glad to get bug reports - this code is being used professionally by me and I need to keep it bug free :)
I'd appreciate a comment or a rating if you decide to go ahead and use anything, feel free to ask questions or make suggestions for improvements!
Best
Mike
Search
Top Rated
- AllChildren ArrangeOverride Automatic Grid Binary Binary Serializer Bug C# ComboBox Component Control custom panel custom silverlight panel dashboard dashboard layout DataBinding DataContract DataContractSerializer DropShadows Element is already the child of another element Element is already the child of another element silverlight Elements is already the child of another element Extensible Application Markup Language Flip Flip Control FrameworkElement visible Grid Grid layout gui ItemsSource Jonathan Feinberg LoadComponent MeasureOverride MEF Microsoft Silverlight Page Turn Plane Projection POCO serialization Programming proportional panel ProportionalPanel Reflection selection lost on ItemsSource update Serialization shared class libararies Share silverlight class .NET Silverlight Silverlight actually visible Silverlight all children Silverlight Binary Serialization Silverlight Binary Serializer Silverlight flip control Silverlight Serialization Source code Stack Overflow Tag cloud TFS UI Performance unity Unity Serializer Visible visual parent VisualState VisualStateManager VisualState Trigger Visual Tree VisualTree WCF Silverlight Word Cloud Wordle XAML XAML debugging XAML Error XamlReader XML [Line: 0 Position: 0]
Author
Mike Talbot is Chief Visionary of 3radical. He started his career as a game programmer working for UbiSoft and Electronic Arts among others. Currently he is programming mobile applications in Javascript, HTML5 and ASP.NET. email: mike.talbot@3radical.com
twitter: mike_talbot
WinApse Latest
- Replatforming Guide: Pros, Cons, and Impact
- Cypress vs Selenium: Why Cypress is Better!
- In-Depth Review: Apache Spark and Flink Side by Side
- C# Null Coalescing Best Practices
- COPY vs ADD in Docker: A Detailed Comparison
- JSON Web Key Sets (JWKS) Ultimate Guide
- What is a Technical Debt Register Template?
- What is Event-Driven Programming?
- Mailtrap Service Review: Pros and Cons
- PUT vs PATCH with REST APIs
Silverlight Show News
- An error has occurred; the feed is probably down. Try again later.