I was doing Code Analysis on my project and I got some warning on rule CA2229
Considering this snippet
[Serializable]
public partial class Split : ModelBase
{
private double? fx;
public int? Currency { get; set; }
public double? Fx
{
get
{
return this.fx;
}
set
{
this.fx = value;
RaisePropertyChanged(() => Fx);
}
}
}
should I implenent the constructor as suggested?
protected Split(SerializationInfo info, StreamingContext context)
{
}
Thanks
Note that the serializable part is only required when using binary serialization. In that case it's best to create 2 constructors: