This is pretty strong with me. Maybe I'm too tired right now.
Rectangle rectangle = new Rectangle(0, 0, image.Width, image.Height); Rectangle cropArea = inputArea == null ? rectangle : inputArea.Value; if (inputArea == null) cropArea = rectangle;
inputArea is the null rectangle, which in my particular case is null.
The first two operators give the cropArea property, initialized to 0. The second, however, gives the correct cropArea function based on the width and height of the image. I did not understand something with the conditional statement? It doesn't seem to return a rectangle when inputArea = null? Are there any quirks when dealing with type values?
EDIT: Well, I should have tried this first: restarted VS. The debugger seems to be lying to me or something like that. In any case, it works now. Thanks.
Max
source share