I have the following bit of code:
public struct Interval
{
public double Min { get; set; }
public double Max { get; set; }
public Interval(double min = double.MinValue, double max = double.MaxValue)
{
Min = min;
Max = max;
}
}
The compiler is complaining that
Backing field for automatically implemented property must be fully assigned before control is returned to the caller. Consider calling the default constructor from a constructor initializer.
Which is something that I don't understand, since my constructor is fully initializing the values of this struct. Isn't it?