Hi I am trying to serialize an array of objects which are derived from a class and I keep hitting the same error using c#. Any help is much appreciated.
obviously this example has been scaled down for the purpose of this post in the real world Shape would contain a plethora of different shapes.
Program.cs
namespace XMLInheritTests
{
class Program
{
static void Main(string[] args)
{
Shape[] a = new Shape[1] { new Square(1) };
FileStream fS = new …Run Code Online (Sandbox Code Playgroud)