The need of the private variables is here. In the existing scenario, during Serialization and Deserialization, the values of errorcode and other public properties will be lost. Thus we need to implement this constructor which gets the value from the Serialization info into the private variables. And the public properties start retaining their values.