c# How to optimize repeated codes on inline if statement
I use a model class to create an object. My code works well but it has code repeat. imagine this code below: ModelA objectA = new ModelA { x = A-B <= 0 ? 0 : A – B, y = C – D > 0 ? C-D : int.MinValue }; This code below creates … Read more