Hi,
I'm having some business objects which contains XElement properties. I have some offline framework which serialize / deserialize using binary formatter. I'm getting the error "Type 'System.Xml.Linq.XElement' in Assembly 'System.Xml.Linq, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable." when i try to serialize the xelement object I'm getting the XElement serializer error. We are bit too far with design and need to find some work around to solve this issue.
The following program should give you the same error behavior.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml.Linq;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
namespace XElementBinaryformatter
{
public partial class Form1 : Form
{
private BinaryFormatter formatter = new BinaryFormatter();
public Form1()
{
InitializeComponent();
}
private void btnSerialize_Clic
View Complete Post