When I provide a constructor with a default value
public MyClass(string description = null) { .... }
is this equivalent to
public MyClass() { .... }
public MyClass(string description) { .... }
in terms of Serialization. In other words, is a default constructor available? Practically it is, but will I face some issues when I use serialization?
No. It unfortunately is not a default constructor.
When you write:
You’re actually making a constructor that accepts a string parameter, but has an attribute marking the default value for that attribute. This is different than having a default constructor on the class.