.NET

Round-lot validation (part 4)

In my previous blog post I was writing about round-lot validation on data type decimal in .NET. I presented that the implementation using simple division of the numbers does not return any false-negatives. It means that the function never returns false, when a value fits into a round lot. However, it can return false-positives. It means that the function may return true, when the value doesn't fit into the round-lot. I also presented a small update to mitigate false-positives, but we didn't eliminate them completely.

Read more...

Round-lot validation (part 3)

Recently I was implementing a validation checking that a number entered by user fits into a configured round-lot. And I decided to write few blog posts about it. In the previous post I presented implementation of the function for data type double. And in this post I will focus on decimal data type.

Read more...

Round-lot validation (part 2)

Recently I was implementing a validation checking that a number entered by user fits into a configured round-lot. And I decided to write few blog posts about it. In the previous post I described the problem and created naive implementation that didn't work in some cases. And I presented implementation that should handle those cases, but there is unanswered question about acceptedError.

Read more...