0
votes

I know where the error is and I have looked over the internet for a solution's however can't seem to fix it.

Here is the constructor in question.

public SplashScreen(Image image)
    {  // Create a constructor which requires the image as a variable;
        this.Image = image;
    }
2

2 Answers

0
votes

To make this a parameterless constructor, you need to remove the Image image and the this.Image = image;. If you want, you can just add such a constructor and leave this version as it is.

0
votes

In order to serialize a class using .Net standard serialization API, you need need to have a parametless constructor. So what would I suggest to do:

public SplashScreen()
{  
}
public Image Image { get; set; }