jsakamoto/ipaddressrange

Public setter property Begin and End dose not change private member "IRangeOperator Operator"

Closed this issue · 1 comments

Public setter property Begin and End dose not change private member "IRangeOperator Operator". The sample code is this.

var ipAddressRange1 = IPAddress(IPAdress.Parse(10.10.0.0), IPAdress.Parse(10.10.255.255));
var result1 = ipAddressRange1.Contains(IPAdress.Parse("10.10.0.1")); // I think this result is true, IPAddressRange 4.1.2 returns true

var ipAddressRange2 = IPAddress { Begin = IPAdress.Parse(10.10.0.0), End = IPAdress.Parse(10.10.255.255) };
var result2 = ipAddressRange2.Contains(IPAdress.Parse("10.10.0.1")); // I think this result is true, but IPAddressRange 4.1.2 returns false

@sudoudaisuke Thank you for reporting!
Oh, what a terrible bug...

I fixed it and published the new version of this library.

Again, thank you for your contributions. 👍